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
4.3.11"
node
const app = new Hono() .get("/", async (c) => { const data = await readData(); return c.json(data); }) .get( "/filtration", zValidator( "query", z.object({ pageSize: z.number().default(10), }) ), async (c) => { const { pageSize } = c.req.valid("query"); const data = await readData(); const result = await splitArrayBySize(data, pageSize); return c.json(result); } ); export default app;
client.api.issues.filtration.$get({ query: {} }).then((res) => { const value = res.json(); // never });
Hopefully, the result will be returned correctly
No response
If you return objects instead, everything is fine
const app = new Hono() .get("/", async (c) => { const data = await readData(); return c.json(data); }) .get( "/filtration", zValidator( "query", z.object({ pageSize: z.number().default(10), }) ), async (c) => { const { pageSize } = c.req.valid("query"); const data = await readData(); const result = await splitArrayBySize(data, pageSize); return c.json({result}); } ); export default app;
The text was updated successfully, but these errors were encountered:
Hi, @bosens-China
I can't reproduce it. Could you provide the minimal project to reproduce it?
Sorry, something went wrong.
@yusukebe
bug like
@bosens-China Thank you!
This problem caused by result type - [number, IssuesDaum[]][] will be treated by never:
result
[number, IssuesDaum[]][]
never
@NamesMT What do you think of this matter? [number, IssuesDaum[]][] should be valid JSON type?
Hi @yusukebe, yes it should be valid, I will make a PR soon fixing the newly added type, it wasn't actually "deep", only one level traverse.
SimplifyDeepArray
Successfully merging a pull request may close this issue.
What version of Hono are you using?
4.3.11"
What runtime/platform is your app running on?
node
What steps can reproduce the bug?
What is the expected behavior?
Hopefully, the result will be returned correctly
What do you see instead?
No response
Additional information
If you return objects instead, everything is fine
The text was updated successfully, but these errors were encountered: