ts-ioc-container 32.19.2 → 32.19.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-ioc-container",
3
- "version": "32.19.2",
3
+ "version": "32.19.3",
4
4
  "description": "Typescript IoC container",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -59,5 +59,5 @@
59
59
  "ts-node": "^10.9.1",
60
60
  "typescript": "5.4.3"
61
61
  },
62
- "gitHead": "6079839647755cc6b4797f3abff6932de4a23d92"
62
+ "gitHead": "81b2510eaaf92d9097aa2ef9e3a0472ab41739fd"
63
63
  }
@@ -12,7 +12,7 @@ export type ChildrenVisibilityPredicate = (options: {
12
12
  export type ArgsFn = (l: IContainer, ...args: unknown[]) => unknown[];
13
13
  export declare function args<T = unknown>(...extraArgs: unknown[]): MapFn<IProvider<T>>;
14
14
  export declare function argsFn<T = unknown>(fn: ArgsFn): MapFn<IProvider<T>>;
15
- export interface IProvider<T = unknown> {
15
+ export interface IProvider<T = any> {
16
16
  key?: DependencyKey;
17
17
  resolve(container: IContainer, options: ProviderResolveOptions): T;
18
18
  isVisible(parent: Tagged, child: Tagged): boolean;
@@ -1,7 +1,7 @@
1
1
  import { ArgsFn, ChildrenVisibilityPredicate, IProvider, ProviderResolveOptions, ResolveDependency } from './IProvider';
2
2
  import { Alias, AliasPredicate, DependencyKey, IContainer, Tagged } from '../container/IContainer';
3
3
  import { constructor, MapFn } from '../utils';
4
- export declare class Provider<T> implements IProvider<T> {
4
+ export declare class Provider<T = any> implements IProvider<T> {
5
5
  private readonly resolveDependency;
6
6
  static fromClass<T>(Target: constructor<T>): IProvider<T>;
7
7
  static fromValue<T>(value: T): IProvider<T>;
@@ -2,7 +2,7 @@ import { DependencyKey, IContainer, IContainerModule } from '../container/IConta
2
2
  import { constructor, MapFn } from '../utils';
3
3
  import { IProvider } from '../provider/IProvider';
4
4
  export type ScopePredicate = (s: IContainer) => boolean;
5
- export interface IRegistration<T = unknown> extends IContainerModule {
5
+ export interface IRegistration<T = any> extends IContainerModule {
6
6
  when(isValidWhen: ScopePredicate): this;
7
7
  to(key: DependencyKey): this;
8
8
  pipe(...mappers: MapFn<IProvider<T>>[]): this;
@@ -10,5 +10,5 @@ export interface IRegistration<T = unknown> extends IContainerModule {
10
10
  export type ReturnTypeOfRegistration<T> = T extends IRegistration<infer R> ? R : never;
11
11
  export declare const key: (key: DependencyKey) => MapFn<IRegistration>;
12
12
  export declare const scope: (predicate: ScopePredicate) => MapFn<IRegistration>;
13
- export declare const getTransformers: (Target: constructor<unknown>) => MapFn<IRegistration<unknown>>[];
13
+ export declare const getTransformers: (Target: constructor<unknown>) => MapFn<IRegistration<any>>[];
14
14
  export declare const register: (...mappers: MapFn<IRegistration>[]) => ClassDecorator;
@@ -2,12 +2,12 @@ import { DependencyKey, IContainer } from '../container/IContainer';
2
2
  import { constructor, MapFn } from '../utils';
3
3
  import { IProvider, ResolveDependency } from '../provider/IProvider';
4
4
  import { IRegistration, ScopePredicate } from './IRegistration';
5
- export declare class Registration<T = unknown> implements IRegistration<T> {
5
+ export declare class Registration<T = any> implements IRegistration<T> {
6
6
  private createProvider;
7
7
  private key?;
8
8
  private matchScope;
9
- static fromClass<T>(Target: constructor<T>): IRegistration<unknown>;
10
- static fromValue<T>(value: T): IRegistration<unknown>;
9
+ static fromClass<T>(Target: constructor<T>): IRegistration<any>;
10
+ static fromValue<T>(value: T): IRegistration<any>;
11
11
  static fromFn<T>(fn: ResolveDependency<T>): Registration<T>;
12
12
  private mappers;
13
13
  constructor(createProvider: (key: DependencyKey) => IProvider<T>, key?: DependencyKey | undefined, matchScope?: ScopePredicate);