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

[Question]TypeScript support #42

Closed
lym8356 opened this issue May 29, 2023 · 4 comments
Closed

[Question]TypeScript support #42

lym8356 opened this issue May 29, 2023 · 4 comments
Labels
question Further information is requested

Comments

@lym8356
Copy link

lym8356 commented May 29, 2023

Hi, does this library support TypeScript?

I am getting errors when I import this library in my TypeScript project.

@janosh
Copy link
Owner

janosh commented May 29, 2023

Yes, TS is supported. Could you be more specific? What error are you seeing?

@janosh janosh added the question Further information is requested label May 29, 2023
@lym8356
Copy link
Author

lym8356 commented May 30, 2023

It says "Cannot find module 'svelte-toc' or its corresponding type declarations."
I have seen this error before when I tried to use a package that does not support typescript, or I forgot to install its @type package.

@janosh
Copy link
Owner

janosh commented May 30, 2023

Sounds like it might be the same problem as janosh/svelte-multiselect#233. If so, the recommended solution is also the same. Either update to typescript v5 and set your module resolution to "bundler" or downgrade to before this package version migrated to svelte-package v2.

@lym8356
Copy link
Author

lym8356 commented Jun 1, 2023

After I set my module resolution to bundler, it is working without problem. Thank you for your help!

@lym8356 lym8356 closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants