From d10145d91a09aef7bce5af80805a3c0fa9d94f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Vatle?= Date: Tue, 25 Feb 2020 06:23:26 +0200 Subject: [PATCH] fix(typescript): Make HookMap and HookObject generics. (#1815) --- packages/feathers/index.d.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/feathers/index.d.ts b/packages/feathers/index.d.ts index 62e9b521ed..bb4d6e71bd 100644 --- a/packages/feathers/index.d.ts +++ b/packages/feathers/index.d.ts @@ -119,21 +119,21 @@ declare namespace createApplication { readonly type: 'before' | 'after' | 'error'; } - interface HookMap { - all: Hook | Hook[]; - find: Hook | Hook[]; - get: Hook | Hook[]; - create: Hook | Hook[]; - update: Hook | Hook[]; - patch: Hook | Hook[]; - remove: Hook | Hook[]; + interface HookMap { + all: Hook | Hook[]; + find: Hook | Hook[]; + get: Hook | Hook[]; + create: Hook | Hook[]; + update: Hook | Hook[]; + patch: Hook | Hook[]; + remove: Hook | Hook[]; } - interface HooksObject { - before: Partial | Hook | Hook[]; - after: Partial | Hook | Hook[]; - error: Partial | Hook | Hook[]; - finally?: Partial | Hook | Hook[]; + interface HooksObject { + before: Partial> | Hook | Hook[]; + after: Partial> | Hook | Hook[]; + error: Partial> | Hook | Hook[]; + finally?: Partial> | Hook | Hook[]; } interface ServiceMethods { @@ -220,4 +220,4 @@ declare namespace createApplication { listen (port: number): http.Server; } -} \ No newline at end of file +}