animate-css-grid icon indicating copy to clipboard operation
animate-css-grid copied to clipboard

Typescript Intergration

Open lloydrichards opened this issue 5 years ago • 0 comments

Greetings,

I'm in the process of (trying) to import this library into my project (react using Typescript) and I've run into two problems that might be related and might not.

The first issue was the type for the document.querySelector(".grid") which was returning < Element > not < HTMLElement > got around this by setting the type in querySelector<HTMLElement>(".grid"). Once this was sorted, i thought it would be smooth sailing but then i ran into my second issue.

TypeError: Failed to resolve module specifier "animate-css-grid". Relative references must start with either "/", "./", or "../". once it compiles I get this error in my browser console. I've tried setting the path to be relative, but again there is some issue here cause it should detect this as a module in TS. If anyone else has had experience setting this up in TS I would be very much interested to hear how

lloydrichards avatar Mar 20 '20 14:03 lloydrichards