ts-ioc-container 47.0.1 → 47.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/typings/hooks/hook.d.ts +1 -2
- package/typings/index.d.ts +1 -1
package/package.json
CHANGED
package/typings/hooks/hook.d.ts
CHANGED
|
@@ -6,9 +6,8 @@ export type HookFn<T extends IHookContext = IHookContext> = (context: T) => void
|
|
|
6
6
|
export interface HookClass<T extends IHookContext = IHookContext> {
|
|
7
7
|
execute(context: Omit<T, 'scope'>): void | Promise<void>;
|
|
8
8
|
}
|
|
9
|
-
type HooksOfClass = Map<string, (HookFn | constructor<HookClass>)[]>;
|
|
9
|
+
export type HooksOfClass = Map<string, (HookFn | constructor<HookClass>)[]>;
|
|
10
10
|
export declare const toHookFn: <C extends IHookContext>(execute: HookFn<C> | constructor<HookClass<C>>) => HookFn<C>;
|
|
11
11
|
export declare function getHooks(target: object, key: string | symbol): HooksOfClass;
|
|
12
12
|
export declare function hasHooks(target: object, key: string | symbol): boolean;
|
|
13
13
|
export declare const hook: (key: string | symbol, ...fns: (HookFn | constructor<HookClass>)[]) => (target: object, propertyKey: string | symbol) => void;
|
|
14
|
-
export {};
|
package/typings/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { DependencyMissingKeyError } from './errors/DependencyMissingKeyError';
|
|
|
19
19
|
export { MethodNotImplementedError } from './errors/MethodNotImplementedError';
|
|
20
20
|
export { ContainerDisposedError } from './errors/ContainerDisposedError';
|
|
21
21
|
export { UnexpectedHookResultError } from './errors/UnexpectedHookResultError';
|
|
22
|
-
export { getHooks, hook, hasHooks, type HookFn, type HookClass, type InjectFn } from './hooks/hook';
|
|
22
|
+
export { getHooks, hook, hasHooks, type HookFn, type HookClass, type InjectFn, type HooksOfClass } from './hooks/hook';
|
|
23
23
|
export { HookContext, type IHookContext } from './hooks/HookContext';
|
|
24
24
|
export { injectProp } from './hooks/injectProp';
|
|
25
25
|
export { onConstructHooksRunner, onConstruct, AddOnConstructHookModule } from './hooks/onConstruct';
|