-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Invalid onAfterResponse
typing
#838
Comments
I commented on a commit actually, but I don't think the author saw it. It appears the unit test for this was commented out, so the regression wasn't caught. Line 1969 in 6109684
|
It's also only in the plugin itself, any plugins that use it will have types. |
We also have this exact same issue from return new Elysia({
name: "logger",
})
.derive(() => {
return {
startTime: performance.now(),
};
})
.onAfterResponse({ as: "global" }, ({ request, set, startTime }) => {
// request, set and startTime are all `never`
}); |
@SaltyAom We gonna have beef real soon if you don't stop watching anime girls and fix this, on folk n em |
What version of Elysia is running?
1.1.13
What platform is your computer?
Linux 5.15.153.1-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
What is the expected behavior?
ctx
is typed correctly andctx.request
existsWhat do you see instead?
ctx
is inferred asnever
in typescriptAdditional information
Same issue doesn't happen on 1.1.12. Might be related with #810
Have you try removing the
node_modules
andbun.lockb
and try again yet?Yes
The text was updated successfully, but these errors were encountered: