We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 })
TS Playground link
The text was updated successfully, but these errors were encountered:
Looks like there's already a PR to fix this #272
Sorry, something went wrong.
No branches or pull requests
consider a query param config with asymmetric encoded and decoded type:
This will fail the typecheck:
TS Playground link
The text was updated successfully, but these errors were encountered: