Importing Createjs for use with Typescript
See original GitHub issueThe @types for createjs seem to be formatted as a namespace instead of a module. If you import as below:
import 'createjs'
You can then access for example:
createjs.Stage
Since the @types (the Typescript typings) are exporting a namespace it then becomes sticky when trying to load the module via a module loader such as SystemJs.
Any comments on how createjs should be imported and loaded would be appreciated.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Is it possible to use EaselJS (CreateJS) with TypeScript using ...
I found a workaround. Use the createjs-module package instead, and use this as your import statement: import * as createjs from ...
Read more >How to use CreateJS on Typescript – Kaplof - Kopf
The below example is for importing easelJS. The problem of using createJS in TypeScript is that it doesn't export modules but just the ......
Read more >@types/createjs - npm
TypeScript definitions for CreateJS. Latest version: 0.0.29, ... Start using @types/createjs in your project by running `npm i @types/createjs`.
Read more >Tools - CreateJS
An AIR application for exporting SWF animations as EaselJS spritesheets for use in ... You can find the typescript definitions of CreateJS's libraries...
Read more >Master Chief, CreateJS & TypeScript - CodeProject
Remember that "Every JavaScript program is also a TypeScript program" and while this is the case the CreateJS libraries are unusable with ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any update on this?
Only way I was able to get createjs to work with typescript using the “import … as …” as noted in most ts documentation was to use the npm package ‘createjs-module’. However, that module package seems to be behind createjs itself so don’t want to use that…
As for this current work around… Not a fan of adding the reference path.
any update in It?! i continue to have a lot offline troubles trying to import easeljs @types in angular2 app 😦(( many thanks