mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #2010 from gyohk/master
Renamed createjs.d.ts to createjs-lib.d.ts for intelligibility.
This commit is contained in:
Vendored
+102
@@ -0,0 +1,102 @@
|
||||
// Type definitions for EaselJS 0.7.1, TweenJS 0.5.1, SoundJS 0.5.2, PreloadJS 0.4.1
|
||||
// Project: http://www.createjs.com/#!/EaselJS
|
||||
// Definitions by: Pedro Ferreira <https://bitbucket.org/drk4>, Chris Smith <https://github.com/evilangelist>, Satoru Kimura <https://github.com/gyohk>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/*
|
||||
Copyright (c) 2012 Pedro Ferreira
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
// Common class and methods for CreateJS.
|
||||
// Library documentation : http://www.createjs.com/Docs/EaselJS/modules/EaselJS.html
|
||||
// Library documentation : http://www.createjs.com/Docs/PreloadJS/modules/PreloadJS.html
|
||||
// Library documentation : http://www.createjs.com/Docs/SoundJS/modules/SoundJS.html
|
||||
// Library documentation : http://www.createjs.com/Docs/TweenJS/modules/TweenJS.html
|
||||
|
||||
|
||||
declare module createjs {
|
||||
export class Event {
|
||||
constructor(type: string, bubbles: boolean, cancelable: boolean);
|
||||
|
||||
// properties
|
||||
bubbles: boolean;
|
||||
cancelable: boolean;
|
||||
currentTarget: any; // It is 'Object' type officially, but 'any' is easier to use.
|
||||
defaultPrevented: boolean;
|
||||
eventPhase: number;
|
||||
immediatePropagationStopped: boolean;
|
||||
propagationStopped: boolean;
|
||||
removed: boolean;
|
||||
target: any; // It is 'Object' type officially, but 'any' is easier to use.
|
||||
timeStamp: number;
|
||||
type: string;
|
||||
|
||||
// other event payloads
|
||||
data: any;
|
||||
delta: number;
|
||||
error: string;
|
||||
id: string;
|
||||
item: any;
|
||||
loaded: number;
|
||||
name: string;
|
||||
next: string;
|
||||
params: any;
|
||||
paused: boolean;
|
||||
progress: number;
|
||||
rawResult: any;
|
||||
result: any;
|
||||
runTime: number;
|
||||
src: string;
|
||||
time: number;
|
||||
total: number;
|
||||
|
||||
// methods
|
||||
clone(): Event;
|
||||
preventDefault(): void;
|
||||
remove(): void;
|
||||
stopImmediatePropagation(): void;
|
||||
stopPropagation(): void;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export class EventDispatcher {
|
||||
constructor();
|
||||
|
||||
// methods
|
||||
addEventListener(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): Function;
|
||||
addEventListener(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): Function;
|
||||
addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean): Object;
|
||||
addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean): Object;
|
||||
dispatchEvent(eventObj: Object, target?: Object): boolean;
|
||||
dispatchEvent(eventObj: string, target?: Object): boolean;
|
||||
dispatchEvent(eventObj: Event, target?: Object): boolean;
|
||||
hasEventListener(type: string): boolean;
|
||||
static initialize(target: Object): void;
|
||||
off(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): void;
|
||||
off(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): void;
|
||||
off(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean): void;
|
||||
off(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean): void;
|
||||
off(type: string, listener: Function, useCapture?: boolean): void; // It is necessary for "arguments.callee"
|
||||
on(type: string, listener: (eventObj: Object) => boolean, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
on(type: string, listener: (eventObj: Object) => void, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
on(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Object;
|
||||
on(type: string, listener: { handleEvent: (eventObj: Object) => void; }, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Object;
|
||||
removeAllEventListeners(type?: string): void;
|
||||
removeEventListener(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: Function, useCapture?: boolean): void; // It is necessary for "arguments.callee"
|
||||
toString(): string;
|
||||
willTrigger(type: string): boolean;
|
||||
}
|
||||
|
||||
export function indexOf(array: any[], searchElement: Object): number;
|
||||
|
||||
export function proxy(method: (eventObj: Object) => boolean, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
export function proxy(method: (eventObj: Object) => void, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
export function proxy(method: { handleEvent: (eventObj: Object) => boolean; }, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
export function proxy(method: { handleEvent: (eventObj: Object) => void; }, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
}
|
||||
Vendored
+11
-89
@@ -4,99 +4,21 @@
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/*
|
||||
Copyright (c) 2012 Pedro Ferreira
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
// Common class and methods for CreateJS.
|
||||
Copyright (c) 2012 Pedro Ferreira
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// Library documentation : http://www.createjs.com/Docs/EaselJS/modules/EaselJS.html
|
||||
// Library documentation : http://www.createjs.com/Docs/PreloadJS/modules/PreloadJS.html
|
||||
// Library documentation : http://www.createjs.com/Docs/SoundJS/modules/SoundJS.html
|
||||
// Library documentation : http://www.createjs.com/Docs/TweenJS/modules/TweenJS.html
|
||||
|
||||
|
||||
declare module createjs {
|
||||
export class Event {
|
||||
constructor(type: string, bubbles: boolean, cancelable: boolean);
|
||||
/// <reference path="./createjs-lib.d.ts" />
|
||||
/// <reference path="../easeljs/easeljs.d.ts" />
|
||||
/// <reference path="../tweenjs/tweenjs.d.ts" />
|
||||
/// <reference path="../preloadjs/preloadjs.d.ts" />
|
||||
/// <reference path="../soundjs/soundjs.d.ts" />
|
||||
|
||||
// properties
|
||||
bubbles: boolean;
|
||||
cancelable: boolean;
|
||||
currentTarget: any; // It is 'Object' type officially, but 'any' is easier to use.
|
||||
defaultPrevented: boolean;
|
||||
eventPhase: number;
|
||||
immediatePropagationStopped: boolean;
|
||||
propagationStopped: boolean;
|
||||
removed: boolean;
|
||||
target: any; // It is 'Object' type officially, but 'any' is easier to use.
|
||||
timeStamp: number;
|
||||
type: string;
|
||||
|
||||
// other event payloads
|
||||
data: any;
|
||||
delta: number;
|
||||
error: string;
|
||||
id: string;
|
||||
item: any;
|
||||
loaded: number;
|
||||
name: string;
|
||||
next: string;
|
||||
params: any;
|
||||
paused: boolean;
|
||||
progress: number;
|
||||
rawResult: any;
|
||||
result: any;
|
||||
runTime: number;
|
||||
src: string;
|
||||
time: number;
|
||||
total: number;
|
||||
|
||||
// methods
|
||||
clone(): Event;
|
||||
preventDefault(): void;
|
||||
remove(): void;
|
||||
stopImmediatePropagation(): void;
|
||||
stopPropagation(): void;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
export class EventDispatcher {
|
||||
constructor();
|
||||
|
||||
// methods
|
||||
addEventListener(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): Function;
|
||||
addEventListener(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): Function;
|
||||
addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean): Object;
|
||||
addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean): Object;
|
||||
dispatchEvent(eventObj: Object, target?: Object): boolean;
|
||||
dispatchEvent(eventObj: string, target?: Object): boolean;
|
||||
dispatchEvent(eventObj: Event, target?: Object): boolean;
|
||||
hasEventListener(type: string): boolean;
|
||||
static initialize(target: Object): void;
|
||||
off(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): void;
|
||||
off(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): void;
|
||||
off(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean): void;
|
||||
off(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean): void;
|
||||
off(type: string, listener: Function, useCapture?: boolean): void; // It is necessary for "arguments.callee"
|
||||
on(type: string, listener: (eventObj: Object) => boolean, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
on(type: string, listener: (eventObj: Object) => void, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
on(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Object;
|
||||
on(type: string, listener: { handleEvent: (eventObj: Object) => void; }, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Object;
|
||||
removeAllEventListeners(type?: string): void;
|
||||
removeEventListener(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: Function, useCapture?: boolean): void; // It is necessary for "arguments.callee"
|
||||
toString(): string;
|
||||
willTrigger(type: string): boolean;
|
||||
}
|
||||
|
||||
export function indexOf(array: any[], searchElement: Object): number;
|
||||
|
||||
export function proxy(method: (eventObj: Object) => boolean, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
export function proxy(method: (eventObj: Object) => void, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
export function proxy(method: { handleEvent: (eventObj: Object) => boolean; }, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
export function proxy(method: { handleEvent: (eventObj: Object) => void; }, scope: Object, ...arg: any[]): (eventObj: Object) => any;
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -12,10 +12,10 @@
|
||||
|
||||
// Library documentation : http://www.createjs.com/Docs/EaselJS/modules/EaselJS.html
|
||||
|
||||
/// <reference path="../createjs/createjs.d.ts" />
|
||||
/// <reference path="../createjs/createjs-lib.d.ts" />
|
||||
/// <reference path="../tweenjs/tweenjs.d.ts" />
|
||||
|
||||
// rename the native MouseEvent, to avoid conflit with createjs's MouseEvent
|
||||
// rename the native MouseEvent, to avoid conflict with createjs's MouseEvent
|
||||
interface NativeMouseEvent extends MouseEvent {
|
||||
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
// Library documentation : http://www.createjs.com/Docs/PreloadJS/modules/PreloadJS.html
|
||||
|
||||
/// <reference path="../createjs/createjs.d.ts" />
|
||||
/// <reference path="../createjs/createjs-lib.d.ts" />
|
||||
|
||||
declare module createjs {
|
||||
export class AbstractLoader extends EventDispatcher {
|
||||
|
||||
Vendored
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
// Library documentation : http://www.createjs.com/Docs/SoundJS/modules/SoundJS.html
|
||||
|
||||
/// <reference path="../createjs/createjs.d.ts" />
|
||||
/// <reference path="../createjs/createjs-lib.d.ts" />
|
||||
|
||||
declare module createjs {
|
||||
export class FlashPlugin {
|
||||
|
||||
Vendored
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
// Library documentation : http://www.createjs.com/Docs/TweenJS/modules/TweenJS.html
|
||||
|
||||
/// <reference path="../createjs/createjs.d.ts" />
|
||||
/// <reference path="../createjs/createjs-lib.d.ts" />
|
||||
|
||||
declare module createjs {
|
||||
export class CSSPlugin {
|
||||
|
||||
Reference in New Issue
Block a user