change return type do any of methods/properties that can return more than 1 type

This commit is contained in:
Pedro Ferreira
2012-11-03 04:52:49 +00:00
parent a8279917cd
commit 14389e137e
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -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;
+2 -2
View File
@@ -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;