Using createJS in typescript?

3414 views powerbi
-5

I am attempting to incorporate createJS into a typescript project (a powerbi visual) that I am building.

I have done the following:

1) Installed createJS and typings file using:

npm install createjs --save and npm install --save @types/createjs

2) Added this line to the the externalJS array in pbiviz.json : "node_modules/createjs/builds/1.0.0/createjs.min.js"

3) Added the path to the typings file to the files array in my tsconfig.ts file: "node_modules/@types/createjs/index.d.ts".

Something didn't go right, I'm seeing the following error in my console: Error Trace

This was without actually calling the namespace in my code, if I attempt to use the namespace then it simply breaks my code without any warnings. My IDE's auto-suggest offers createjsimplying to me that it was imported properly but still something isn't right.

Can anyone help?

answered question

1 Answer

13

enter code here

Your code needs to execute AFTER including create.js - order matters.

posted this

Have an answer?

JD

Please login first before posting an answer.