@sigodenjs/dee-srv
Advanced tools
Comparing version 0.17.0 to 0.18.0
export interface ServiceGroup extends SrvExt.ServiceGroup { | ||
[k: string]: any; | ||
[k: string]: ServiceBase; | ||
} | ||
@@ -11,2 +11,4 @@ export interface SrvContext { | ||
} | ||
export declare const INIT_KEY: unique symbol; | ||
export declare const STOP_KEY: unique symbol; | ||
export interface SrvConfig { | ||
@@ -27,12 +29,9 @@ /** | ||
export interface ServiceBase { | ||
[INIT_KEY]?: () => Promise<void> | void; | ||
[STOP_KEY]?: () => Promise<void> | void; | ||
} | ||
export declare type Stop = () => void; | ||
export declare type InitOutput<T> = { | ||
srv: T; | ||
stop?: Stop; | ||
}; | ||
export interface InitFn<T, U, P extends { | ||
export interface InitFn<T extends ServiceBase, U, P extends { | ||
[k: string]: any; | ||
}> { | ||
(ctx: SrvContext, args: U, ctor?: Ctor<T>, depends?: P): Promise<InitOutput<T>>; | ||
(ctx: SrvContext, args: U, ctor?: Ctor<T>, depends?: P): Promise<T>; | ||
deps?: string[]; | ||
@@ -39,0 +38,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.INIT_KEY = Symbol("init"); | ||
exports.STOP_KEY = Symbol("stop"); | ||
; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sigodenjs/dee-srv", | ||
"version": "0.17.0", | ||
"version": "0.18.0", | ||
"description": "A way to write and organize service", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2105
47