Type Alias: Registered<S, T, R>
Registered<
S,T,R> =Rextendstrue?Omit<S, keyofT> &T:S&T
Defined in: src/types.ts:865
Service map S plus the services in T. With R true (the registration passed replace: true), T's services replace the same keys of S, so replacing a service changes its type instead of intersecting the old and the new one.
Type Parameters
S
S
T
T
R
R
Example
ts
type Added = Registered<{ port: string }, { host: string }, false>; // { port: string } & { host: string }
type Replaced = Registered<{ port: string; host: string }, { port: number }, true>;
// Omit<{ port: string; host: string }, 'port'> & { port: number }