URL Parameter name
Optionalassert: (value: string) => T
Conversion and assertion supplied by the compile-time transform
Optionalvalidate: boolean
Emit an errors array on validation failure when true; otherwise expose the first failure as flat path, reason, expected and value fields.
Parameter decorator
contracts/common.md#principled-implementation The path parameter arrives as a string and is converted by the assertion function the transform generated for the declared type, so a value of the wrong type produces a 400 that names the parameter; the validate flag only changes the error body from the flat form to an errors array.
contracts/common.md#clear-and-simple-design One decorator with one conversion function and one error-shaping branch.
contracts/common.md#prohibited-implementation-shortcuts The conversion is generated from the declared type; without the transform the raw string is returned only when the configuration guard is off.
Type safe URL parameter decorator.
TypedParamis a decorator function getting specific typed parameter from the HTTP request URL. It's almost same with the nest.Param, butTypedParamautomatically casts parameter value to be following its type, and validates it.