diff --git a/index.d.ts b/index.d.ts index f64eda788..2d24ae93a 100644 --- a/index.d.ts +++ b/index.d.ts @@ -720,12 +720,10 @@ declare namespace Moleculer { version?: string | number; } - type ServiceSyncLifecycleHandler> = (this: T) => void; - type ServiceAsyncLifecycleHandler> = ( - this: T - ) => void | Promise; + type ServiceSyncLifecycleHandler = (this: T) => void; + type ServiceAsyncLifecycleHandler = (this: T) => void | Promise; - interface ServiceSchema { + interface ServiceSchema> { name: string; version?: string | number; settings?: S; @@ -737,9 +735,9 @@ declare namespace Moleculer { hooks?: ServiceHooks; events?: ServiceEvents; - created?: ServiceSyncLifecycleHandler | ServiceSyncLifecycleHandler[]; - started?: ServiceAsyncLifecycleHandler | ServiceAsyncLifecycleHandler[]; - stopped?: ServiceAsyncLifecycleHandler | ServiceAsyncLifecycleHandler[]; + created?: ServiceSyncLifecycleHandler | ServiceSyncLifecycleHandler[]; + started?: ServiceAsyncLifecycleHandler | ServiceAsyncLifecycleHandler[]; + stopped?: ServiceAsyncLifecycleHandler | ServiceAsyncLifecycleHandler[]; [name: string]: any; }