From 5dfdca64bb6fee5cbb7b1676be0e7737e7ea6172 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Fri, 19 Jan 2018 14:09:09 -0800 Subject: [PATCH] fix: added hook options --- src/hooks.ts | 10 +++++++--- src/index.ts | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/hooks.ts b/src/hooks.ts index 05d5dd0e..a2cddaac 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -3,8 +3,8 @@ import {IConfig} from './config' import {IPJSON} from './pjson' import {IPluginModule} from './plugin' -export interface IHooks { - init: {} +export interface Hooks { + init: {id: string} update: {} 'plugins:parse': { module: IPluginModule @@ -16,4 +16,8 @@ export interface IHooks { } } -export type Hook = (options: T & {config: IConfig}) => Promise +export interface IHookReturn { + exit?: number +} + +export type IHook = (options: T & {config: IConfig}) => Promise diff --git a/src/index.ts b/src/index.ts index 4d4e4beb..ab46b727 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ export * from './command' export * from './config' -export * from './topic' -export * from './plugin' export * from './engine' +export * from './hooks' +export * from './plugin' +export * from './topic' export {IPJSON} from './pjson'