Open Wuyuh-sun opened 1 year ago
I'm having a similar issue. When
.use(
jwt({
name: 'jwt',
// This should be Environment Variable
secret: 'MY_SECRETS',
})
)
I get the following:
No overload matches this call.
The last overload gave the following error.
Argument of type 'Elysia<"", { request: { jwt: { readonly sign: (morePayload: Record<string, string> & JWTPayloadSpec) => Promise<string>; readonly verify: (jwt?: string | undefined) => Promise<...>; }; }; store: {}; }, { ...; }, {}, {}, false>' is not assignable to parameter of type 'Promise<{ default: Elysia<any, any, any, any, any, any>; }>'.
Type 'Elysia<"", { request: { jwt: { readonly sign: (morePayload: Record<string, string> & JWTPayloadSpec) => Promise<string>; readonly verify: (jwt?: string | undefined) => Promise<...>; }; }; store: {}; }, { ...; }, {}, {}, false>' is missing the following properties from type 'Promise<{ default: Elysia<any, any, any, any, any, any>; }>': then, catch, finally, [Symbol.toStringTag]ts(2769)
index.d.ts(392, 5): The last overload is declared here.
the same issue with .use(cookie())
Yep having same issue
Same issue here with 0.7.24 (the message is in Portuguese)
Problem still persists with 0.7.28
It seems the output file in the npm dist directory doesn't match the type. For the time being, i can solve this by:
Nice to meet you. I am a Korean preparing to become a developer. We apologize for the inconvenience caused by raising the issue through a translator and ask for your understanding.
I am developing a personal blog through elysia with bun, and while using the @elysiajs/jwt^0.7.1 module, the name set in jwt is not properly entered into the decorate of the context.
Please check this issue and let me know the solution.
+++ It seems to work normally in version 0.6.1.