createToken
createToken<
T>(name):Token<T>
Defined in: packages/di-craft/src/core/token/token.ts:26
Creates a unique typed token.
The name is used only for diagnostics. Token identity is unique per call,
so two tokens with the same name do not collide.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Token<T>
Example
Section titled “Example”const CONFIG = createToken<Config>("config");