Hi,
is there anyone who managed to import the 'diagram-library' npm package into an Angular 2+ project?
I added diagram-library to package.json and saved the file which caused an automatic restorage of my npm packages in my node_modules folder.
The diagram-library folder contains some Javascript files (Common, Diagramming) and a typed file (t.ds).
I'd like to take advantage of that typings, that's why I am not including the JavaScript files by the HTML <script> tags.
What I did was the following:
import { MindFusion } from 'diagram-library';
import Diagram = MindFusion.Diagramming.Diagram;
import DiagramLink = MindFusion.Diagramming.DiagramLink;
import ShapeNode = MindFusion.Diagramming.ShapeNode;
import Rect = MindFusion.Drawing.Rect;
import LayeredLayout = MindFusion.Graphs.LayeredLayout;
The first line is throwing an error, saying:
Quote:The file ".../jsdiag.t.ds" is not a module
.
I think the problem is that you are not exporting the declared namespace nor any classes?
But I don't know, as I'm pretty new to Angular and Typescript.
How can I solve the issue without losing the advantage of type safety on compile time and word suggestions?
Thanks in advance