Interface: TaggedKey<T, K>
Defined in: src/tagged-keys.ts:18
A key built by a tag (route('orders')). It carries the tag's type, so registering a service under it checks the service against that type. In the service map the key is the plain string ('orders:route').
Example
ts
const route = createTag('route').of<Route>();
const key: 'orders:route' & TaggedKey<Route, 'orders:route'> = route('orders');
app.addSingleton(key, () => ({ path: '/orders' })); // checked against RouteType Parameters
T
T
K
K extends string | number | symbol = string
Properties
[taggedKeyBrand]
readonly[taggedKeyBrand]:object
Defined in: src/tagged-keys.ts:20
Type only: the type of the services registered under this key, and the plain key.
key
readonlykey:K
type
readonlytype:T