-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
5
Plugin version
4.0.1
Node.js version
20
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
n/a
Description
The following schema
{
schema: {
// ...
response: {
200: {
type: 'string',
headers: {
'Content-Type': { type: 'application/octet-stream', default: 'text/csv' },
},
},
},
},
}Leads to reply.send being typed as (payload: string | undefined) => ....
This is problematic because sending streams leads to a type error
Argument of type
Readableis not assignable to parameter of typestring.
Link to code that reproduces the bug
No response
Expected Behavior
reply.send(someReadable) does not lead to a type error
Metadata
Metadata
Assignees
Labels
No labels