Midnight Posted December 20, 2013 Share Posted December 20, 2013 Hello, guys.I'm trying to set up a workplace using CreateJS and Typescript. So far I tried only to use VisualStudio for this.I see everyone using the "createjs." namespace, can't find it in .d files from here: https://github.com/borisyankov/DefinitelyTypedOr is there another way of using Typescript with all the typing, intellisense and debugging? Quote Link to comment Share on other sites More sharing options...
Alvin Posted December 20, 2013 Share Posted December 20, 2013 Well I thought there was only a defintion file for easelJS but apparently I was wrong : https://github.com/borisyankov/DefinitelyTyped/blob/master/createjs/createjs.d.ts Quote Link to comment Share on other sites More sharing options...
Midnight Posted December 20, 2013 Author Share Posted December 20, 2013 That repository contains all createjs definitions. (CreateJS, EaselJS, SoundJS,TweenJS and PreloadJS). Edit: Apparently the namespace was declared in easeljs.d.ts, now I don't know how to make VS see .js files as implementation files and stop getting errors like this: Error 1 Class ColorMatrix declares interface number[] but does not implement it:Types of property 'concat' of types 'ColorMatrix' and 'number[]' are incompatible:Call signatures of types '{ (...matrix: number[]): ColorMatrix; <ColorMatrix extends number[]>(...items: ColorMatrix[]): number[]; }' and '{ <U extends T[]>(...items: U[]): number[]; (...items: number[]): number[]; }' are incompatible:Types of property 'reduceRight' of types 'ColorMatrix' and 'number[]' are incompatible:Call signatures of types '{ (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; <U>(callbackfn: (previousValue: ColorMatrix, currentValue: number, currentIndex: number, array: number[]) => ColorMatrix, initialValue: ColorMatrix): ColorMatrix; }' and '{ (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; <U>(callbackfn: (previousValue: U, currentValue ... D:\My html5 developments\DemoVisualiserfr\DemoVisualiserfr\GettingStarted\easeljs\easeljs.d.ts 123 18 DemoVisualiserfr Edit 2: I suppose it's something with "/// <reference path=", but no success yet.Edit 3: Not the "reference path". In easeljs.d.ts line 123 throws this error, but since i'm new to typescript I can't really understand why. Quote Link to comment Share on other sites More sharing options...
Midnight Posted December 20, 2013 Author Share Posted December 20, 2013 So I went ahead and commented out the "implements" part in easeljs.d.ts:export class ColorMatrix /*implements Array<number>*/ {//...}Tested, this tutorial now works: http://www.createjs.com/tutorials/Getting%20Started/ Quote Link to comment Share on other sites More sharing options...
sashastg Posted December 31, 2013 Share Posted December 31, 2013 hi, try use php storm (netbeans) and put all js files in project folder (relative path). its works perfect for me. Quote Link to comment Share on other sites More sharing options...
bmarotta Posted August 17, 2017 Share Posted August 17, 2017 Check it out how to do it here: http://www.kopf.com.br/kaplof/how-to-use-createjs-on-typescript/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.