Open
Description
What version of Elysia is running?
latest / 1.2.10
What platform is your computer?
Darwin 23.5.0 arm64 arm
What steps can reproduce the bug?
bun add elysia@lastest
import Elysia, { t } from 'elysia'
new Elysia()
.get('/', ({ query: { id } }) => typeof id, {
query: t.Object({
id: t.Number()
}),
})
.listen(3000)
What is the expected behavior?
Hope to obtain the correct type prompt
What do you see instead?
When the mouse is placed on query: {id}
, there is no prompt for number
, but for id: string | undefined
And when the corresponding type prompt cannot be obtained in the third parameter of the get method
Additional information
I tried using it in version 1.1.20 and was able to get the correct type prompt. However, this is only the last version I used and not the last one that can get the correct prompt
Have you try removing the node_modules
and bun.lockb
and try again yet?
yes