Typescript on VS Code shows type any instead of the correct type

Viewed 173

I'm making a node library where it's important for me to have the types for consumers but for some reason when I import my class from outside src VS Code will replace types on hints of some of the functions to any or any[], it seems that it will only do that for complex types but why does it happen only outside src and why at all?

When I ctrl + hover, it does show the correct type on the hint, but still when filling in the parameters VS Code doesn't help at all with object variable names or union types

I tried exporting all the types used in the function from the main entry point (src/index.ts) but that doesn't seem to help.

Is that a vscode bug? Something I can do to fix it?

https://github.com/origeva/node-sponsorblock-api

Hovering one of the functions

0 Answers
Related