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

Type issue with 5.0 #72

Open
lity opened this issue Nov 30, 2023 · 3 comments
Open

Type issue with 5.0 #72

lity opened this issue Nov 30, 2023 · 3 comments

Comments

@lity
Copy link

lity commented Nov 30, 2023

When I import fastify-socket.io 5.0 in my typescript project, like this:

...
import FastifyIO from 'fastify-socket.io'
...

type error reported:

"Cannot find module 'fastify-socket.io' or its corresponding type declarations."

I have to use // @ts-ignore to suppress the error, like this:

...
// @ts-ignore
import FastifyIO from 'fastify-socket.io'
...

@vats-24
Copy link

vats-24 commented Apr 17, 2024

I am also facing the same issue how did you resolved it?

@lity
Copy link
Author

lity commented Apr 18, 2024

I am also facing the same issue how did you resolved it?

just used // @ts-ignore

@alemagio
Copy link
Collaborator

Check this https://github.com/ducktors/fastify-socket.io?tab=readme-ov-file#typescript

The problem is that socket.io let's you type the io instance, which is great, that's why this plugin does not ship types anymore.
So that you can type your instance.

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

No branches or pull requests

3 participants