TypeScript Definitions (d.ts)?

Hey I've just started developing a HTML5 game using WebStorm and I want to use TypeScript as my JavaScript preprocessor.

I've got it all setup so that my TypeScript files have Watchers on them so they'll compile the JavaScript files everytime I save the file (and there are no syntax errors).

However I want to use the EaselJS from the CreateJS library.

How do I go about using this existing JavaScript library through TypeScript in WebStorm?

I read somewhere you need to use TypeScript definition files, I found the one for EaselJS here.

How do I go about using it in my WebStorm project?

Thanks in advance,

I <3 WebStorm :D

Comment actions Permalink


just put these .d.ts files into your project folder - they will be available both to WebStorm typescript parser and ts compiler configured as a file watcher

Comment actions Permalink

So this isn't required?

/// <reference path="createjs/soundjs/soundjs.d.ts" />


Comment actions Permalink

TypeScript parser in WebStorm can do without reference path comments (it will resolve the types). But the compiler still needs them. So, yes - it's required


Please sign in to leave a comment.