diff --git a/index.d.ts b/index.d.ts index 827d0b7..1ca6ece 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,9 @@ -export function onShutdown( - name: (() => Promise) | string | string[], - dependencies?: (() => Promise) | string[], - handler?: () => Promise -): void; +interface OnShutdown { + (handler: ()=> Promise): void + (name: string, handler: ()=> Promise): void + (name: string, dependencies: string[], handler: ()=> Promise): void +} + +export const onShutdown: OnShutdown export function onShutdownError(callback: (error: Error) => Promise): void;