Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic [TypeScript/Angular2] Diagram Library throws compile time error (Read 2476 times)
Shafi
Full Member
***
Offline


I Love MindFusion!

Posts: 109
Joined: Nov 8th, 2016
[TypeScript/Angular2] Diagram Library throws compile time error
Feb 14th, 2017 at 9:00am
Print Post  
I installed the diagram-library using the npm install command. But i cant resolve the MindFusion namespace in my ts file. Do I need any imports or some other configuration for using this package?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: [TypeScript/Angular2] Diagram Library throws compile time error
Reply #1 - Feb 14th, 2017 at 10:39am
Print Post  
Have you added jsdiag.d.ts reference? This compiled successfully in our test with main .ts file in project's root folder and diagram-library npm-installed there -

Code
Select All
/// <reference path="node_modules/diagram-library/jsdiag.d.ts" />

var Diagram = MindFusion.Diagramming.Diagram; 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Shafi
Full Member
***
Offline


I Love MindFusion!

Posts: 109
Joined: Nov 8th, 2016
Re: [TypeScript/Angular2] Diagram Library throws compile time error
Reply #2 - Feb 14th, 2017 at 12:08pm
Print Post  
Thanks. That worked  Smiley

One more question about compatibility:
In previous MindFusion versions, there was the MindFusion.Collections API which I cannot find anymore.Can you please tell me what is this API changed to?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: [TypeScript/Angular2] Diagram Library throws compile time error
Reply #3 - Feb 14th, 2017 at 1:27pm
Print Post  
I guess you were using Collections directly from JavaScript at some point. We've never had it defined for TypeScript, we'll try to add it to d.ts file for upcoming release.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint