Closed xmlking closed 5 years ago
export type Provider<T = any> =
| Type<any>
| ClassProvider<T>
| ValueProvider<T>
| FactoryProvider<T>
| ExistingProvider<T>;
export interface ClassProvider<T = any> {
provide: string | symbol | Type<any> | Abstract<any> | Function;
useClass: Type<T>;
scope?: Scope;
}
export interface ValueProvider<T = any> {
provide: string | symbol | Type<any> | Abstract<any> | Function;
useValue: T;
}
export interface FactoryProvider<T = any> {
provide: string | symbol | Type<any> | Abstract<any> | Function;
useFactory: (...args: any[]) => T;
inject?: Array<Type<any> | string | symbol | Abstract<any> | Function>;
scope?: Scope;
}
export interface ExistingProvider<T = any> {
provide: string | symbol | Type<any> | Abstract<any> | Function;
useExisting: any;
}
You can use ValueProvider
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.