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
true
node.js
18.18
21.3.3
No response
Hapi application
The docs for route.options.payload.multipart say that true should be a valid option:
route.options.payload.multipart
But the types file (lib/types/route.d.ts) does not allow this and flags it as an error:
lib/types/route.d.ts
The JS code (lib/config.js seems to agree with the docs, so I think the types file is wrong.
lib/config.js
Can someone confirm what the correct type and usage here should be?
Make a route with route.options.payload.multipart set to true. E.g.
payload: { maxBytes: 209715200, output: 'stream', parse: true, allow: 'multipart/form-data', multipart: true, },
Typescript error: Type 'true' is not assignable to type 'false | { output: PayloadOutput | "annotated"; } | undefined'
Type 'true' is not assignable to type 'false | { output: PayloadOutput | "annotated"; } | undefined'
true should be an accepted value.
The text was updated successfully, but these errors were encountered:
@otajor fixed in #4507
Sorry, something went wrong.
No branches or pull requests
Runtime
node.js
Runtime version
18.18
Module version
21.3.3
Last module version without issue
No response
Used with
Hapi application
Any other relevant information
The docs for
route.options.payload.multipart
say thattrue
should be a valid option:But the types file (
lib/types/route.d.ts
) does not allow this and flags it as an error:The JS code (
lib/config.js
seems to agree with the docs, so I think the types file is wrong.Can someone confirm what the correct type and usage here should be?
What are you trying to achieve or the steps to reproduce?
Make a route with
route.options.payload.multipart
set to true. E.g.What was the result you got?
Typescript error:
Type 'true' is not assignable to type 'false | { output: PayloadOutput | "annotated"; } | undefined'
What result did you expect?
true
should be an accepted value.The text was updated successfully, but these errors were encountered: