Open
Description
consider a query param config with asymmetric encoded and decoded type:
const NumberToStringParam: QueryParamConfig<number, string> = {
encode: (value) => value.toString(),
decode: (value) => {
if (typeof value !== 'string') {
return ''
}
return value ?? ''
}
}
This will fail the typecheck:
encodeQueryParams({
foo: NumberToStringParam
},
{
foo: 123
})
Metadata
Metadata
Assignees
Labels
No labels