route configuration
A list or dictionary that maps each web path to its settings or handler, such as /checkout requiring authentication.
In more detail
Each entry pairs a path such as /checkout with its settings, such as whether sign-in is required. Typing the table with const type parameters or satisfies checks every entry while keeping each exact path string.
Related terms
- const type parameter — A type parameter marked const, such as <const T>, which makes the compiler infer the exact literal types of arguments, as if the caller wrote as const.
- satisfies — An operator, value satisfies Type, that checks a value matches a type without changing the value's own, more precise inferred type.
Taught in
- Const Type Parameters: Retaining Literal Types In Functions — Production TypeScript
- The satisfies Operator: Safe Validation Without Widening — Production TypeScript