-
-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
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
Missing Buffer<ArrayBufferLike>
type in the parameter of c.body
#3729
Comments
Maybe it's related to {
"compilerOptions": {
"allowImportingTsExtensions": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"noEmit": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ESNext",
"verbatimModuleSyntax": true
}
} I created a reproducion: https://github.com/rtritto/template-yarn-berry/tree/repro-hono-3729 |
okay, I'll check |
The types of |
i submitted a pull request for something that might fix this, if you want you can try https://github.com/itztiva/hono |
Yes, it works. |
What version of Hono are you using?
4.6.12
What runtime/platform is your app running on? (with version if possible)
Node.js 22
What steps can reproduce the bug?
readFileSync(zipPath)
is of typeBuffer<ArrayBufferLike>
.c.body
accept data havingstring | ArrayBuffer | ReadableStream
types.Maybe
Buffer<ArrayBufferLike>
type should be added to data parameter ofc.body
.What is the expected behavior?
No TypeScript error
What do you see instead?
TypeScript error:
Additional information
Workaround:
Maybe related:
Question
There is any better/right alternative to download a zip file from browser?
The text was updated successfully, but these errors were encountered: