Open Fumaz opened 1 year ago
We are rewriting Elysia type which should essentially solve this problem. See https://github.com/elysiajs/elysia/pull/103
Please leave this issue open until we get Elysia to 0.7
Having the same issue with elysia 0.7.0 and @elysiajs/eden 0.7.0
It actually gives me the following TypeScript error:
TS2344: Type 'Elysia<"", { request: { [x: string]: any; }; store: { [x: string]: any; }; }, { type: { [x: string]: any; }; error: { [x: string]: any; }; }, { body: unknown; headers: unknown; query: unknown; params: unknown; cookie: unknown; response: unknown; }, any, false>' does not satisfy the constraint 'Elysia<any, any, { type: {}; error: {}; }, {}, {}, false>'.same. I also have to import @elysiajs/eden/fetch
instead of @elysiajs/eden
, otherwise it returns just any
.
It was fixed with the latest release :)
Still seeing some weird TS errors that I can't really make sense of when using edenTreaty.
Type 'Elysia<"", { request: { readonly prisma: () => PrismaClient<{ log: ("query" | "error")[]; }, never, DefaultArgs>; readonly bearer: string | undefined; userContext: { ...; }; }; store: {}; }, { ...; }, { ...; }, { ...; }, false>' does not satisfy the constraint 'Elysia<any, any, any, any, any, any>'.
Types have separate declarations of a private property 'dependencies'.
Hi, I'm using Elysia with Eden Treaty and I use multiple Elysia instances, some of them having prefixes to keep the code tidy. However, when trying to use Eden Treaty, the intellisense is really slow and most of the time it times out and just doesn't work at all.