mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
change return type do any of methods/properties that can return more than 1 type
This commit is contained in:
Vendored
+3
-3
@@ -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;
|
||||
|
||||
Vendored
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user