Type declaration not working correctly
Hey, I'm using TypeScript and when trying to import anything from moonlink I get the following error
Not sure if this is something on my side but every other package is working fine.
18 Replies
Do you transpile it into ecmascript?
like-goldOP•2y ago
yep
Could you do a test for me, put it in tsconfig.json
"skipLibCheck": true
like-goldOP•2y ago
already is set to true
🤔
Does this error appear every time you try to start your project?
like-goldOP•2y ago
I'm not even starting it, IntelliSense is already showing me that error and typings simply dont work
But yeah, it also comes up when starting the project
I just want to understand the problem, because the project has all definitions of all files
Try putting it on the import side // @ts-ignore
If it works I'll have to think of another way to declare
like-goldOP•2y ago
When looking up the error I found this interesting answer on StackOverflow: https://stackoverflow.com/a/76212193 After looking at the package.json of your project it seems like we have a similar problem here
Stack Overflow
The xxxx library may need to update its package.json or typings.ts
I have a public component library call rd-component, when I used this component "rd-component": "^0.1.47" in the new project, the visual studio code show error like this:
Could ...

I'll try to put types in the .
like-goldOP•2y ago
Worth a try
GG @Dome, you just advanced to level 1!
like-goldOP•2y ago
Changed it locally in my node modules folder and can confirm it is working now
Finished, install new version and test please
I also updated the typescript of the package to see if it wasn't that too
I also found an interesting if this way does not work
like-goldOP•2y ago
working fine now!
thanks for the quick help!
You're welcome, have a great day 🙂
like-goldOP•2y ago
you too :)