Create an Injectable factory function with dependencies (i.e. the factory function has arguments).
Note: the list of dependencies must contain only string literals or string consts.
Ex:
const DependencyB = 'DependencyB'
const createMyService = Injectable(
'MyService',
['DependencyA', DependencyB] as const,
(a: A, b: B) => { return ... },
)
A unique string Token which will correspond to the created Service.
A readonly list of Tokens corresponding to dependencies (i.e. arguments to the Factory), which will be resolved by the Container to which this Injectable is provided.
A function with arguments matching in type and length to the given list of dependencies. When called, it must return the Service.
Generated using TypeDoc
Create an Injectable factory function with no dependencies (i.e. the factory function has no arguments).
Ex: