Skip to content

Type Alias: ServiceToken<T>

ts
type ServiceToken<T> = 
  | Newable<T>
  | AbstractClass<T>
  | string
  | symbol
| InjectionToken<T>;

Defined in: src/wirestate-core/binding/binding.ts:57

Token accepted by container lookup and injection APIs.

Type Parameters

Type ParameterDefault typeDescription
TunknownValue type resolved for the token.

Remarks

A token can be an injectable class constructor, abstract class token, string, symbol, or InjectionToken. Class tokens and InjectionToken<T> carry the resolved value type. Plain strings and symbols resolve as unknown unless the call site supplies a type argument.