import * as Config from '.'; export interface Hooks { [event: string]: object; init: { id: string | undefined; argv: string[]; }; prerun: { Command: Config.Command.Class; argv: string[]; }; postrun: { Command: Config.Command.Class; result?: any; argv: string[]; }; preupdate: { channel: string; }; update: { channel: string; }; 'command_not_found': { id: string; }; 'plugins:preinstall': { plugin: { name: string; tag: string; type: 'npm'; } | { url: string; type: 'repo'; }; }; } export declare type HookKeyOrOptions = K extends (keyof Hooks) ? Hooks[K] : K; export declare type Hook = (this: Hook.Context, options: HookKeyOrOptions & { config: Config.IConfig; }) => any; export declare namespace Hook { type Init = Hook; type PluginsPreinstall = Hook; type Prerun = Hook; type Postrun = Hook; type Preupdate = Hook; type Update = Hook; type CommandNotFound = Hook; interface Context { config: Config.IConfig; exit(code?: number): void; error(message: string | Error, options?: { code?: string; exit?: number; }): void; warn(message: string): void; log(message?: any, ...args: any[]): void; debug(...args: any[]): void; } }