Closed niyas-ali closed 5 years ago
Hi! I'm not sure about TypeScript as I've never used this before, but I'm sure using npm in a TypeScript project should work the same as a regular one. Did you get any errors while npm i smooth-scrolling
?
Hi,I'm not getting any error while installing but i think it's not supporting typescript.
Hi @niyas-ali, could you share a repository I could clone to test it out?
Hi @niyas-ali ,
That is because this repo doesn't have TypeScript type definitions (.d.ts file). To work around this, you can create a file named types.d.ts
in your project and add the following code to it:
declare module 'smooth-scrolling' {
const value: any;
export = value;
}
I got a work around for this issue hence you can close this issue @baptistebriel Thanks!!!
I'm not able to import Smooth class into my typescript project import Smooth from 'smooth-scrolling'; // throwing error 'Can not find module smooth-scrolling'