From 14389e137e73d483211edb78ab0fe1042100cfd9 Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Sat, 3 Nov 2012 04:52:49 +0000 Subject: [PATCH] change return type do any of methods/properties that can return more than 1 type --- Definitions/easeljs-0.5.d.ts | 6 +++--- Definitions/soundjs-0.3.d.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Definitions/easeljs-0.5.d.ts b/Definitions/easeljs-0.5.d.ts index ee78cec69..a3452a719 100644 --- a/Definitions/easeljs-0.5.d.ts +++ b/Definitions/easeljs-0.5.d.ts @@ -101,7 +101,7 @@ module createjs { export class AlphaMaskFilter extends Filter { // properties - mask: any; //HERE or HTMLCanvasElement + mask: any; // HTMLImageElement or HTMLCanvasElement // methods constructor (mask: HTMLImageElement); @@ -112,7 +112,7 @@ 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; @@ -471,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; diff --git a/Definitions/soundjs-0.3.d.ts b/Definitions/soundjs-0.3.d.ts index e9f5c425e..7355b34b7 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;