Skip to content

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.

T

string

Token<T>

const CONFIG = createToken<Config>("config");