mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
fixed several syntax errors.
This commit is contained in:
Vendored
+5
-5
@@ -65,19 +65,19 @@ declare module createjs {
|
||||
constructor();
|
||||
|
||||
// methods
|
||||
addEventListener(type: string, listener: Function, useCapture?: boolean): any;
|
||||
addEventListener(type: string, listener: (eventObj: Object) => any, useCapture?: boolean): any;
|
||||
addEventListener(type: string, listener: Object, useCapture?: boolean): any;
|
||||
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: Function, useCapture?: boolean): void;
|
||||
off(type: string, listener: (eventObj: Object) => any, useCapture?: boolean): void;
|
||||
off(type: string, listener: Object, useCapture?: boolean): void;
|
||||
on(type: string, listener, scope?: Function, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
on(type: string, listener, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
on(type: string, listener: (eventObj: Object) => any, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
on(type: string, listener: Object, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
removeAllEventListeners(type?: string): void;
|
||||
removeEventListener(type: string, listener: Function, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: (eventObj: Object) => any, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: Object, useCapture?: boolean): void;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ function test_animation() {
|
||||
ss.getAnimation("run").next = "jump";
|
||||
ss.getAnimation("jump").next = "run";
|
||||
|
||||
var sprite = new createjs.Sprite(ss);
|
||||
var sprite:createjs.Sprite = new createjs.Sprite(ss);
|
||||
sprite.scaleY = sprite.scaleX = .4;
|
||||
|
||||
sprite.gotoAndPlay("run");
|
||||
|
||||
Vendored
+9
-25
@@ -398,7 +398,7 @@ declare module createjs {
|
||||
|
||||
// properties
|
||||
static BASE_64: Object;
|
||||
static Command: Function;
|
||||
static Command: any;
|
||||
static STROKE_CAPS_MAP: string[];
|
||||
static STROKE_JOINTS_MAP: string[];
|
||||
|
||||
@@ -431,7 +431,7 @@ declare module createjs {
|
||||
endStroke(): Graphics;
|
||||
static getHSL(hue: number, saturation: number, lightness: number, alpha?: number): string;
|
||||
static getRGB(r: number, g: number, b: number, alpha?: number): string;
|
||||
inject(callback: Function, data: Object): Graphics;
|
||||
inject(callback: (data: any) => any, data: any): Graphics;
|
||||
isEmpty(): boolean;
|
||||
lineTo(x: number, y: number): Graphics;
|
||||
moveTo(x: number, y: number): Graphics;
|
||||
@@ -540,22 +540,6 @@ declare module createjs {
|
||||
clone(): MouseEvent;
|
||||
toString(): string;
|
||||
|
||||
// EventDispatcher mixins
|
||||
addEventListener(type: string, listener: Function, useCapture?: boolean): any;
|
||||
addEventListener(type: string, listener: Object, useCapture?: boolean): any;
|
||||
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: Function, useCapture?: boolean): void;
|
||||
off(type: string, listener: Object, useCapture?: boolean): void;
|
||||
on(type: string, listener, scope?: Function, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
on(type: string, listener, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
removeAllEventListeners(type?: string): void;
|
||||
removeEventListener(type: string, listener: Function, useCapture?: boolean): void;
|
||||
removeEventListener(type: string, listener: Object, useCapture?: boolean): void;
|
||||
|
||||
// events
|
||||
/*
|
||||
mousemove: (event: MouseEvent) => any; // deprecated
|
||||
@@ -664,8 +648,8 @@ declare module createjs {
|
||||
|
||||
|
||||
export class Sprite extends DisplayObject {
|
||||
constructor(spriteSheet: SpriteSheet, frameOrAnimation: string);
|
||||
constructor(spriteSheet: SpriteSheet, frameOrAnimation: number);
|
||||
constructor(spriteSheet: SpriteSheet, frameOrAnimation?: string);
|
||||
constructor(spriteSheet: SpriteSheet, frameOrAnimation?: number);
|
||||
|
||||
// properties
|
||||
currentAnimation: string;
|
||||
@@ -861,18 +845,18 @@ declare module createjs {
|
||||
static setPaused(value: boolean): void;
|
||||
|
||||
// EventDispatcher mixins
|
||||
static addEventListener(type: string, listener: Function, useCapture?: boolean): any;
|
||||
static addEventListener(type: string, listener: (eventObj: Object) => any, useCapture?: boolean): any;
|
||||
static addEventListener(type: string, listener: Object, useCapture?: boolean): any;
|
||||
static dispatchEvent(eventObj: Object, target?: Object): boolean;
|
||||
static dispatchEvent(eventObj: string, target?: Object): boolean;
|
||||
static dispatchEvent(eventObj: Event, target?: Object): boolean;
|
||||
static hasEventListener(type: string): boolean;
|
||||
static off(type: string, listener: Function, useCapture?: boolean): void;
|
||||
static off(type: string, listener: (eventObj: Object) => any, useCapture?: boolean): void;
|
||||
static off(type: string, listener: Object, useCapture?: boolean): void;
|
||||
static on(type: string, listener, scope?: Function, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
static on(type: string, listener, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
static on(type: string, listener: (eventObj: Object) => any, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
static on(type: string, listener: Object, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
static removeAllEventListeners(type?: string): void;
|
||||
static removeEventListener(type: string, listener: Function, useCapture?: boolean): void;
|
||||
static removeEventListener(type: string, listener: (eventObj: Object) => any, useCapture?: boolean): void;
|
||||
static removeEventListener(type: string, listener: Object, useCapture?: boolean): void;
|
||||
|
||||
// events
|
||||
|
||||
Vendored
+1
-1
@@ -65,7 +65,7 @@ declare module createjs {
|
||||
// methods
|
||||
getItem(value: string): Object;
|
||||
getResult(value: string, rawResult?: boolean): Object;
|
||||
installPlugin(plugin: Function): void;
|
||||
installPlugin(plugin: any): void;
|
||||
loadFile(file: Object, loadNow?: boolean, basePath?: string): void;
|
||||
loadFile(file: string, loadNow?: boolean, basePath?: string): void;
|
||||
loadManifest(manifest: Object[], loadNow?: boolean, basePath?: string): void;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Feature set example:
|
||||
createjs.Sound.addEventListener("fileload", createjs.proxy(this.loadHandler, this));
|
||||
createjs.Sound.registerSound("path/to/mySound.mp3|path/to/mySound.ogg", "sound");
|
||||
function loadHandler(event) {
|
||||
function loadHandler(event):void {
|
||||
// This is fired for each sound that is registered.
|
||||
var instance = createjs.Sound.play("sound"); // play using id. Could also use full sourcepath or event.src.
|
||||
instance.addEventListener("complete", createjs.proxy(this.handleComplete, this));
|
||||
|
||||
Vendored
+7
-7
@@ -122,19 +122,19 @@ declare module createjs {
|
||||
*/
|
||||
|
||||
// EventDispatcher mixins
|
||||
static addEventListener(type: string, listener: Function, useCapture?: boolean): any;
|
||||
static addEventListener(type: string, listener: (eventObj: Object) => any, useCapture?: boolean): any;
|
||||
static addEventListener(type: string, listener: Object, useCapture?: boolean): any;
|
||||
static dispatchEvent(eventObj: Object, target?: Object): boolean;
|
||||
static dispatchEvent(eventObj: string, target?: Object): boolean;
|
||||
static dispatchEvent(eventObj: Event, target?: Object): boolean;
|
||||
static hasEventListener(type: string): boolean;
|
||||
static off(type: string, listener: Function, useCapture?: boolean): void;
|
||||
static off(type: string, listener: (eventObj: Object) => any, useCapture?: boolean): void;
|
||||
static off(type: string, listener: Object, useCapture?: boolean): void;
|
||||
static on(type: string, listener, scope?: Function, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
static on(type: string, listener, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
static removeEventListener(type: string, listener: Function, useCapture?: boolean): void;
|
||||
static removeEventListener(type: string, listener: Object, useCapture?: boolean): void;
|
||||
static on(type: string, listener: (eventObj: Object) => any, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
static on(type: string, listener: Object, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function;
|
||||
static removeAllEventListeners(type?: string): void;
|
||||
static removeEventListener(type: string, listener: (eventObj: Object) => any, useCapture?: boolean): void;
|
||||
static removeEventListener(type: string, listener: Object, useCapture?: boolean): void;
|
||||
|
||||
}
|
||||
|
||||
@@ -211,6 +211,6 @@ declare module createjs {
|
||||
removeFromPreload(src: string): void;
|
||||
removeSound(src: string): void;
|
||||
setMute(value: boolean): boolean;
|
||||
setVolume(value: Number): boolean;
|
||||
setVolume(value: number): boolean;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
///<reference path="./tweenjs.d.ts"/>
|
||||
///<reference path="../easeljs/easeljs.d.ts"/>
|
||||
|
||||
declare var target;
|
||||
var target: createjs.DisplayObject = new createjs.DisplayObject();
|
||||
var Tween = createjs.Tween;
|
||||
|
||||
// source : http://www.createjs.com/Docs/TweenJS/modules/TweenJS.html
|
||||
|
||||
Vendored
+1
-1
@@ -142,7 +142,7 @@ declare module createjs {
|
||||
target: Object;
|
||||
|
||||
// methods
|
||||
call(callback: Function, params?: any[], scope?: Object): Tween;
|
||||
call(callback: (...params: any[]) => any, params?: any[], scope?: Object): Tween;
|
||||
static get(target: Object, props?: Object, pluginData?: Object, override?: boolean): Tween;
|
||||
static hasActiveTweens(target?: Object): boolean;
|
||||
static installPlugin(plugin: Object, properties: any[]): void;
|
||||
|
||||
Reference in New Issue
Block a user