-
Notifications
You must be signed in to change notification settings - Fork 218
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
How to annotation query type? #349
Comments
|
OK, fine. |
@pi0 is there any reason why getQuery doesnt accept generics? If no any problems with it i will be happy to contribute for this |
It's sooo ugly, should unknow first.
|
I think as soon as Query implements |
PR welcome to support generic type 🙏 |
This issue can be fixed at 2 layers:
|
ufo generic support released and h3 support landing via #417 in next release 🚀 |
Environment
node : 18.12.1
nuxt: 3.0.0
h3: 1.0.2
Reproduction
export default defineEventHandler(async (event) => {
const { res } = event.node
const { code, name, someNumber } = getQuery(event)
})
Describe the bug
code
,name
,someNumber
types are infer tostring | QueryValue[] | null
How do I give types of them? Not where I use them with
as
assert.like:
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: