// Server
=================================================
package.json deps:
"@elysiajs/cookie": "^0.8.0",
"@elysiajs/cors": "^1.0.2",
"@elysiajs/jwt": "^0.8.0",
"@elysiajs/swagger": "^0.8.5",
"@prisma/client": "5.10.2",
"elysia": "latest"
=================================================
const app = new Elysia();
app
.use(swagger()) // It does not change after commenting out this line
.use(cookie()) // It does not change after commenting out this line
.use(corsHandler) // It does not change after commenting out this line
.use(errorHandler) // It does not change after commenting out this line
.use(eventHandler) // It does not change after commenting out this line
.use(jwtHandler) // It does not change after commenting out this line
.use(authRoutes)
.listen(process.env.PORT || 4000);
export type App = typeof app;
// type App = Elysia<"", {
// request: {};
// store: {};
// derive: {};
// resolve: {};
// }, {
// type: {};
// error: {};
// }, {}, {}, {}, false> <== This is what VSC is showing when I hover App object
// Client
=================================================
package.json deps:
"@elysiajs/eden": "latest",
"elysia": "latest", // It does not change after commenting out this line
=================================================
import { edenTreaty } from "@elysiajs/eden";
import type { App } from "../../../../project-api/src/index";
const app = edenTreaty<App>("http://localhost:4000");
// Outcome
Type 'Elysia<"", { request: {}; store: {}; derive: {}; resolve: {}; }, { type: {}; error: {}; }, {}, {}, {}, false>' does not satisfy the constraint 'Elysia<any, any, any, any, any, any, any, any>'.
Type 'Elysia<"", { request: {}; store: {}; derive: {}; resolve: {}; }, { type: {}; error: {}; }, {}, {}, {}, false>' is missing the following properties from type 'Elysia<any, any, any, any, any, any, any, any>': _routes, _types, _ephemeral, _volatile, and 11 more.ts(2344)
Am I doing something wrong?