ui-router-registry / ui-router-registry / AssertNoCollisions
Type Alias: AssertNoCollisions<T>
ts
type AssertNoCollisions<T> = T;Defined in: registry.ts:98
T itself, when every row in it is the one registered under its name. Two modules that register one name with different rows keep only the first, and on TypeScript 5 skipLibCheck hides the error, so a module can assert its table where it registers it:
ts
export type ContactsStates = AssertNoCollisions<typeof contactsStates>;A row that collides fails the constraint at that line, keyed 'not the row registered under' with the state's name.
Type Parameters
| Type Parameter |
|---|
T extends readonly { name: string; }[] & { readonly [I in keyof T]: [Collision<T[I]>] extends [never] ? T[I] : { not the row registered under: Collision<T[I]> } } |