Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: Hook.PluginsPreinstall shape
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Bergman committed Oct 3, 2018
1 parent 7a69d6c commit 52a420a
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,11 @@ export type HookKeyOrOptions<K> = K extends (keyof Hooks) ? Hooks[K] : K
export type Hook<T> = (this: Hook.Context, options: HookKeyOrOptions<T> & {config: Config.IConfig}) => any

export namespace Hook {
export type Init = Hook<{
id: string | undefined,
argv: string[],
}>
export type PluginsPreinstall = Hook<{
name: string,
tag: string,
type: 'npm'
}>
export type Prerun = Hook<{
Command: Config.Command.Class
argv: string[]
}>
export type Update = Hook<{}>
export type CommandNotFound = Hook<{
id: string
}>
export type Init = Hook<Hooks['init']>
export type PluginsPreinstall = Hook<Hooks['plugins:preinstall']>
export type Prerun = Hook<Hooks['prerun']>
export type Update = Hook<Hooks['update']>
export type CommandNotFound = Hook<Hooks['command_not_found']>

export interface Context {
config: Config.IConfig
Expand Down

0 comments on commit 52a420a

Please sign in to comment.