Closed editpetercolquhoun closed 2 years ago
The title is a bit confusing. Does it happen when trying to import Shikwasa in a typescript project? What is the error message? Also please include reproduction steps.
Sorry for the confusion, it does happen when using (import Shikwasa from 'shikwasa') into the TS project, the specific error message is (Could not find a declaration file for module 'shikwasa'). It recommends i install the module with (npm i --save-dev @types/shikwasa) but this returns a 404. Thanks for your help.
Ok, so now we're clear that it isn't an internal library error. This happens a lot when you try to import javascript libraries to a typescript project. Installing @types/shikwasa
won't work because I did not submit any type declaration files to @types
.
As a quick fix-it-all, just make sure typescript could find the module. in a local type declaration file in your project, e.g. types.d.ts
:
declare module 'shikwasa'
This will eliminate the error.
Thanks this fixed the issue.
I have installed the latest version of shikwasa with npm but we are currently using TS and I have seen on your roadmap that TS is something you are working on, is it possible to get early access to the TS version. Thanks