I'm trying to import interactive.js 1.7.2 in Angular 8. I installed as follows:
npm install interactjs@next
then imported in different ways and none worked:
import * as interact from 'interactjs';
import interact from 'interactjs'
import from 'interactjs';
import * as interact from '@interactjs/interactjs';
declare var interact:any; (with no imports)
The solution here seems to work for others but not for me.
I get many errors when starting up Angular so it has to be a problem with the import, for example I get:
src/app/web/visuals/svg.rectangle.ts(65,25): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof import("C:/projects/myproject/node_modules/@interactjs/interactjs/index")' has no compatible call signatures.
../../node_modules/@interactjs/core/Interactable.d.ts(7,19): error TS1086: An accessor cannot be declared in an ambient context.
../../node_modules/@interactjs/core/Interaction.d.ts(74,45): error TS2304: Cannot find name 'Omit'.
How to fix this issue?
UPDATE
This problem is documented here but with no solution.