Open W-Lawless opened 3 months ago
Just added this package and attempted to use it as shown in the README.
I get this error from typescript:
No overload matches this call. The last overload gave the following error. Argument of type '(app: Elysia<"", false, { decorator: {}; store: {}; derive: {}; resolve: {}; }, { type: {}; error: {}; }, { schema: {}; macro: {}; }, {}, { derive: {}; resolve: {}; schema: {}; }, { derive: {}; resolve: {}; schema: {}; }>) => Elysia<...>' is not assignable to parameter of type 'Promise<{ default: AnyElysia; }>'.ts(2769) index.d.ts(777, 5): The last overload is declared here. (alias) ip(userOptions?: Partial<Options> | undefined): (app: Elysia<"", false, { decorator: {}; store: {}; derive: {}; resolve: {}; }, { type: {}; error: {}; }, { schema: {}; macro: {}; }, {}, { ...; }, { ...; }>) => Elysia<...>
Usage:
import { ip } from "elysia-ip"; const app = new Elysia().use(ip()).get("/", () => ({ message: "Hello Elysia" }));
package json:
"elysia": "latest",
try remove node_modules and install package again.
rm ./node_modules -rf && bun i
@W-Lawless Does this solve your issue?
Just added this package and attempted to use it as shown in the README.
I get this error from typescript:
Usage:
import { ip } from "elysia-ip"; const app = new Elysia().use(ip()).get("/", () => ({ message: "Hello Elysia" }));
package json:
"elysia": "latest",