diff --git a/Definitions/easeljs-0.5.d.ts b/Definitions/easeljs-0.5.d.ts index 974faa11c7..a3452a7199 100644 --- a/Definitions/easeljs-0.5.d.ts +++ b/Definitions/easeljs-0.5.d.ts @@ -93,7 +93,7 @@ module createjs { alphaMap: any; //Image or HTMLCanvasElement // methods - constructor (alphaMap: Image); //HERE doesn't recognize Image type + constructor (alphaMap: HTMLImageElement); constructor (alphaMap: HTMLCanvasElement); clone(): AlphaMapFilter; } @@ -101,10 +101,10 @@ module createjs { export class AlphaMaskFilter extends Filter { // properties - mask: Image; //HERE or HTMLCanvasElement + mask: any; // HTMLImageElement or HTMLCanvasElement // methods - constructor (mask: Image); + constructor (mask: HTMLImageElement); constructor (mask: HTMLCanvasElement); clone(): AlphaMaskFilter; } @@ -112,12 +112,12 @@ module createjs { export class Bitmap extends DisplayObject { // properties - image: any; //HERE how to tell the various type possibilities? + image: any; // HTMLImageElement or HTMLCanvasElement or HTMLVideoElement snapToPixel: bool; sourceRect: Rectangle; // methods - constructor (imageOrUrl: Image); + constructor (imageOrUrl: HTMLImageElement); constructor (imageOrUrl: HTMLCanvasElement); constructor (imageOrUrl: HTMLVideoElement); constructor (imageOrUrl: string); @@ -223,7 +223,8 @@ module createjs { // methods addChild(...child: DisplayObject[]): DisplayObject; - addChildAt(...child: DisplayObject[], index: number): DisplayObject; //HERE typescript doesnt like having an argument after the variable length argument + //addChildAt(...child: DisplayObject[], index: number): DisplayObject; //HERE typescript doesnt like having an argument after the variable length argument + addChildAt(...child: any[]): DisplayObject; clone(recursive?: bool): Container; contains(child: DisplayObject): bool; getChildAt(index: number): DisplayObject; @@ -470,7 +471,7 @@ module createjs { spriteSheet: SpriteSheet; // methods - addFrame(source: DisplayObject, sourceRect?: Rectangle, scale?: number, setupFunction?: () => any, setupParams?: any[], setupScope?: Object): number; //HERE returns number or null + addFrame(source: DisplayObject, sourceRect?: Rectangle, scale?: number, setupFunction?: () => any, setupParams?: any[], setupScope?: Object): any; //HERE returns number or null addMovieClip(source: MovieClip, sourceRect?: Rectangle, scale?: number): void; build(): void; buildAsync(callback?: (reference: SpriteSheetBuilder) => any, timeSlice?: number): void; @@ -482,9 +483,9 @@ module createjs { export class SpriteSheetUtils { static addFlippedFrames(spriteSheet: SpriteSheet, horizontal?: bool, vertical?: bool, both?: bool): void; - static extractFrame(spriteSheet: Image, frame: number): Image; //HERE - static flip(spriteSheet: Image, flipData: Object): void; - static mergeAlpha(rgbImage: Image, alphaImage: Image, canvas?: HTMLCanvasElement): HTMLCanvasElement; + static extractFrame(spriteSheet: HTMLImageElement, frame: number): HTMLImageElement; + static flip(spriteSheet: HTMLImageElement, flipData: Object): void; + static mergeAlpha(rgbImage: HTMLImageElement, alphaImage: HTMLImageElement, canvas?: HTMLCanvasElement): HTMLCanvasElement; } diff --git a/Definitions/soundjs-0.3.d.ts b/Definitions/soundjs-0.3.d.ts index e9f5c425e8..7355b34b7c 100644 --- a/Definitions/soundjs-0.3.d.ts +++ b/Definitions/soundjs-0.3.d.ts @@ -45,7 +45,7 @@ module createjs { paused: bool; playState: string; src: string; - uniqueId: string; //HERE string or number + uniqueId: any; //HERE string or number // methods getDuration(): number; @@ -89,7 +89,7 @@ module createjs { // methods static checkPlugin(initializeDefault: bool): bool; static getCapabilities(): Object; - static getCapability(key: string); //HERE can return string | number | bool + static getCapability(key: string): any; //HERE can return string | number | bool static getInstanceById(uniqueId: string): SoundInstance; static getMasterVolume(): number; static getSrcFromId(value: string): string;