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

Argument of type 'typeof fastifyOpenTelemetry' is not assignable to parameter of type 'FastifyPluginCallback<{ wrapRoutes: boolean; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger> | FastifyPluginAsync<...> | Promise<...> | Promise<...>'. #74

Open
jmikedupont2 opened this issue Jan 6, 2025 · 2 comments · May be fixed by #75

Comments

@jmikedupont2
Copy link

reproducable here:
https://github.com/jmikedupont2/fastify-eliza-vercel/actions/runs/12624370786/job/35174543578#step:5:67

> tsc

Error: src/plugins/tracing.ts(13,22): error TS2769: No overload matches this call.
  Overload 1 of 6, '(plugin: FastifyPluginCallback<{ wrapRoutes: boolean; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts: FastifyRegisterOptions<...>): FastifyInstance<...> & ... 1 more ... & { ...; }', gave the following error.
    Argument of type 'typeof fastifyOpenTelemetry' is not assignable to parameter of type 'FastifyPluginCallback<{ wrapRoutes: boolean; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
      Type 'typeof fastifyOpenTelemetry' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }, done: (err?: Error | undefined) => void): void'.
  Overload 2 of 6, '(plugin: FastifyPluginAsync<{ wrapRoutes: boolean; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts: FastifyRegisterOptions<...>): FastifyInstance<...> & ... 1 more ... & { ...; }', gave the following error.
    Argument of type 'typeof fastifyOpenTelemetry' is not assignable to parameter of type 'FastifyPluginAsync<{ wrapRoutes: boolean; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
      Type 'typeof fastifyOpenTelemetry' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }): Promise<...>'.
  Overload 3 of 6, '(plugin: FastifyPluginCallback<{ wrapRoutes: boolean; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger> | FastifyPluginAsync<...> | Promise<...> | Promise<...>, opts: FastifyRegisterOptions<...>): FastifyInstance<...> & ... 1 more ... & { ...; }', gave the following error.
    Argument of type 'typeof fastifyOpenTelemetry' is not assignable to parameter of type 'FastifyPluginCallback<{ wrapRoutes: boolean; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger> | FastifyPluginAsync<...> | Promise<...> | Promise<...>'.
 ELIFECYCLE  Command failed with exit code 2.
Error: The operation was canceled.
0s
Post job cleanup.
Pruning is unnecessary.
@HW13
Copy link
Collaborator

HW13 commented Jan 10, 2025

Thanks for providing a recreation of the error @jmikedupont2. I was able to reproduce it and have updated our type declarations accordingly -> #75

@jmikedupont2
Copy link
Author

Yeah thanks to GitHub for the free compute I wonder how long that's going to last

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants