createParameterDecoder
createParameterDecoder<
T>(): (input) =>T
Defined in: wp-typia-rest/src/http.ts:183
Decode one scalar route or query parameter from its string form.
Type Parameters
Section titled “Type Parameters”T extends string | number | bigint | boolean | null
Returns
Section titled “Returns”A decoder that coerces string input into primitive parameter values.
(input) => T
Example
Section titled “Example”const decodeId = createParameterDecoder<number>();const id = decodeId("42");