Skip to content
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

No overload matches this call TS2769 error? #39

Open
Sardonyx001 opened this issue Oct 22, 2024 · 0 comments
Open

No overload matches this call TS2769 error? #39

Sardonyx001 opened this issue Oct 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Sardonyx001
Copy link

What version of Logestic are you using?

1.2.4

What is the bug and how to reproduce it?

Using Logestic according to documentation:

import { Elysia } from "elysia";
import { Logestic } from "logestic";

const app = new Elysia()
  .use(Logestic.preset("fancy"))
  .get("/", () => "Hello Elysia")
  .listen(3000);

console.log(
  `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
);

Gives this TS2769 typescript error on line 4:

No overload matches this call.
  The last overload gave the following error.
    Argument of type 'Elysia<"", false, { decorator: { logestic: Logestic<keyof Attribute>; }; store: { logestic_timeStart: bigint; }; derive: {}; resolve: {}; }, { type: {}; error: {}; }, { schema: {}; macro: {}; macroFn: {}; }, {}, { ...; }, { ...; }>' is not assignable to parameter of type 'Promise<{ default: AnyElysia; }>'.
      Type 'Elysia<"", false, { decorator: { logestic: Logestic<keyof Attribute>; }; store: { logestic_timeStart: bigint; }; derive: {}; resolve: {}; }, { type: {}; error: {}; }, { schema: {}; macro: {}; macroFn: {}; }, {}, { ...; }, { ...; }>' is missing the following properties from type 'Promise<{ default: AnyElysia; }>': then, catch, finally, [Symbol.toStringTag]ts(2769)
index.d.ts(886, 5): The last overload is declared here.

And this one on the next line:

This expression is not callable.
  Each member of the union type '(<const Path extends string, const LocalSchema extends InputSchema<string>, const Schema extends MergeSchema<UnwrapRoute<LocalSchema, any>, MergeSchema<any, MergeSchema<any, any>>>, const Macro extends any, const Handle extends InlineHandler<...>>(path: Path, handler: Handle, hook?: LocalHook<...> | undefined) => El...' has signatures, but none of those signatures are compatible with each other.ts(2349)
⚠ Error (TS2349)  | 

What is the expected behaviour?

No error

Any additional information/media?

Despite the error everything seems to work fine?
out
out2

@Sardonyx001 Sardonyx001 added the bug Something isn't working label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant