You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, for some reason, when returning an error() from the route handler, the response value fails an instanceof check against ElysiaCustomStatusResponse:
functionmyAfterHandle({ response }){if(responseinstanceofElysiaCustomStatusResponse){// <-- This always returns falseconsole.log("Yes");return;}}
Using the constructor name to get around the instanceof fail does work. Is there a better approach though?
What version of Elysia is running?
1.2.10
What platform is your computer?
Linux 6.8.0-50-generic x86_64 x86_64
What steps can reproduce the bug?
Create a simple handler with an
afterHandle
such as,The
response
prop is typed asnever
, although it's actually the object returned from the handler.What is the expected behavior?
The type of
response
inafterHandle
should match the returned object from the handler.What do you see instead?
The type is
never
Details
Additional information
No response
Have you try removing the
node_modules
andbun.lockb
and try again yet?yes
The text was updated successfully, but these errors were encountered: