Skip to content
GitHub

Token

type alias in meocord/interface Since 4.1.0

type Token<T> = symbol & { readonly [tokenType]?: T }

A symbol that names a value to provide and inject, typed with what it provides, as createToken makes it.

Use one for a value that is not a class instance, such as a settings object or a client from another library, so @Inject and TestingModule.get know its type.

See also

  • createToken