I am encountering a similar issue as described in this post => Finding the correct import for a third party DefinitelyTyped module
In my Angular (TS) project, I am attempting to integrate VanillaTilt. I have used this index.d.ts and saved it in the same directory as app.component.ts
. Here is the snippet of code:
import VanillaTilt from 'vanilla-tilt';
VanillaTilt.init(document.createElement('a'), { perspective: 1000 });
However, I am encountering the following TypeScript error:
ERROR in src/app/app.component.ts(3,8): error TS1192: Module '"vanilla-tilt"' has no default export.
I also attempted utilizing this version of the d.ts
, but I kept receiving
Cannot read property 'init' of undefined
Does anyone have any advice on how to successfully incorporate VanillaTilt in an Angular5 project?