Description
Description
The generated client allows overriding parseAs at runtime via endpoint options, but the generated TypeScript signatures still assume the data is returned normally.
Basically if you use parseAs: "blob" it still returns the regular data typing and not the data as a blob.
Because options is spread after the default, responseStyle: 'fields' works at runtime. But the return type is still hardcoded to 'data'.
Expected behavior
If a caller passes parseAs: "blob" the returned data should be of type 'blob'
Reproducible example or configuration
https://stackblitz.com/edit/hey-api-client-fetch-example
OpenAPI specification (optional)
No response
System information (optional)
No response
Description
Description
The generated client allows overriding
parseAsat runtime via endpoint options, but the generated TypeScript signatures still assume the data is returned normally.Basically if you use
parseAs: "blob"it still returns the regular data typing and not the data as a blob.Because options is spread after the default, responseStyle: 'fields' works at runtime. But the return type is still hardcoded to 'data'.
Expected behavior
If a caller passes
parseAs: "blob"the returned data should be of type 'blob'Reproducible example or configuration
https://stackblitz.com/edit/hey-api-client-fetch-example
OpenAPI specification (optional)
No response
System information (optional)
No response