From 944a4a50dee2962d93461714ccc9f8c73a9125d5 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 8 Mar 2013 04:14:48 -0800 Subject: [PATCH 1/6] preloadjs: converted inconsistent intentation to spaces (like easeljs). --- preloadjs/preloadjs.d.ts | 64 ++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/preloadjs/preloadjs.d.ts b/preloadjs/preloadjs.d.ts index 4edbe81ae..accd9feba 100644 --- a/preloadjs/preloadjs.d.ts +++ b/preloadjs/preloadjs.d.ts @@ -21,42 +21,42 @@ module createjs { close(): void; getItem(value: string): Object; load(): void; - toString(): string; + toString(): string; // events - complete: (event: Object) => any; - error: (event: Object) => any; - fileload: (event: Object) => any; - fileprogress: (event: Object) => any; - loadStart: (event: Object) => any; + complete: (event: Object) => any; + error: (event: Object) => any; + fileload: (event: Object) => any; + fileprogress: (event: Object) => any; + loadStart: (event: Object) => any; - // EventDispatcher mixins - addEventListener(type: string, listener: (eventObj: Object) => bool): Function; - addEventListener(type: string, listener: (eventObj: Object) => bool): Object; - removeEventListener(type: string, listener: (eventObj: Function) => bool): void; - removeEventListener(type: string, listener: (eventObj: Object) => bool): void; - removeAllEventListeners(type: string): void; - dispatchEvent(eventObj: string, target: Object): bool; - dispatchEvent(eventObj: Object, target: Object): bool; - hasEventListener(type: string): bool; + // EventDispatcher mixins + addEventListener(type: string, listener: (eventObj: Object) => bool): Function; + addEventListener(type: string, listener: (eventObj: Object) => bool): Object; + removeEventListener(type: string, listener: (eventObj: Function) => bool): void; + removeEventListener(type: string, listener: (eventObj: Object) => bool): void; + removeAllEventListeners(type: string): void; + dispatchEvent(eventObj: string, target: Object): bool; + dispatchEvent(eventObj: Object, target: Object): bool; + hasEventListener(type: string): bool; } - export class PreloadJS { - version: string; - buildDate: string; - } + export class PreloadJS { + version: string; + buildDate: string; + } export class LoadQueue extends AbstractLoader { constructor (useXHR?: bool); // properties - static BINARY: string; + static BINARY: string; static CSS: string; static IMAGE: string; static JAVASCRIPT: string; static JSON: string; static SOUND: string; - static SVG: string; + static SVG: string; static TEXT: string; static LOAD_TIMEOUT: number; static XML: string; @@ -68,7 +68,7 @@ module createjs { // methods BrowserDetect(): Object; - init(useXHR?: bool): void; + init(useXHR?: bool): void; close(): void; getResult(value: string): Object; initialize(useXHR: bool): void; @@ -78,14 +78,14 @@ module createjs { loadFile(file: string, loadNow: bool): void; loadManifest(manifest: Object[], loadNow: bool): void; loadManifest(manifest: string[], loadNow: bool): void; - getItem(value: string): Object; - getResult(value: string, rawResult?: bool): Object; - removeAll(): void; - remove(idsOrUrls: string): void; - remove(idsOrUrls: Array): void; - reset(): void; + getItem(value: string): Object; + getResult(value: string, rawResult?: bool): Object; + removeAll(): void; + remove(idsOrUrls: string): void; + remove(idsOrUrls: Array): void; + reset(): void; setMaxConnections(value: number): void; - setUseXHR(value: bool): void; + setUseXHR(value: bool): void; setPaused(value: bool): void; } @@ -93,13 +93,13 @@ module createjs { export class TagLoader extends AbstractLoader { constructor (item: Object, srcAttr: string, useXHR: bool); constructor (item: string, srcAttr: string, useXHR: bool); - getResult(): HTMLImageElement; - getResult(): HTMLAudioElement; + getResult(): HTMLImageElement; + getResult(): HTMLAudioElement; } export class XHRLoader extends AbstractLoader { constructor (file: Object); - getResult(rawResult?: bool); + getResult(rawResult?: bool); } } From 1a748a6a961776d16ba628cc02f51ea8b56a6241 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 8 Mar 2013 04:16:38 -0800 Subject: [PATCH 2/6] preloadjs: loadFile() and loadManifest() second argument should be optional --- preloadjs/preloadjs.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/preloadjs/preloadjs.d.ts b/preloadjs/preloadjs.d.ts index accd9feba..798f0622b 100644 --- a/preloadjs/preloadjs.d.ts +++ b/preloadjs/preloadjs.d.ts @@ -74,10 +74,10 @@ module createjs { initialize(useXHR: bool): void; installPlugin(plugin: () => any): void; load(): void; - loadFile(file: Object, loadNow: bool): void; - loadFile(file: string, loadNow: bool): void; - loadManifest(manifest: Object[], loadNow: bool): void; - loadManifest(manifest: string[], loadNow: bool): void; + loadFile(file: Object, loadNow?: bool): void; + loadFile(file: string, loadNow?: bool): void; + loadManifest(manifest: Object[], loadNow?: bool): void; + loadManifest(manifest: string[], loadNow?: bool): void; getItem(value: string): Object; getResult(value: string, rawResult?: bool): Object; removeAll(): void; From 4edce74116f04a5b9fd937a8061eb8e1d4b5f211 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 8 Mar 2013 04:18:12 -0800 Subject: [PATCH 3/6] preloadjs: removed unnecessary overload of getResult() on LoadQueue --- preloadjs/preloadjs.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/preloadjs/preloadjs.d.ts b/preloadjs/preloadjs.d.ts index 798f0622b..51c9cee1f 100644 --- a/preloadjs/preloadjs.d.ts +++ b/preloadjs/preloadjs.d.ts @@ -70,7 +70,6 @@ module createjs { BrowserDetect(): Object; init(useXHR?: bool): void; close(): void; - getResult(value: string): Object; initialize(useXHR: bool): void; installPlugin(plugin: () => any): void; load(): void; From 6c510f8050c0f5c0e61ad605aab79749317af443 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 8 Mar 2013 04:21:17 -0800 Subject: [PATCH 4/6] tweenjs: converted inconsistent intentation to spaces (like easeljs). --- tweenjs/tweenjs.d.ts | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/tweenjs/tweenjs.d.ts b/tweenjs/tweenjs.d.ts index 82e9fd25c..7e424bbbc 100644 --- a/tweenjs/tweenjs.d.ts +++ b/tweenjs/tweenjs.d.ts @@ -12,10 +12,10 @@ module createjs { - export class TweenJS { - // properties - version: string; - buildDate: string; + export class TweenJS { + // properties + version: string; + buildDate: string; } @@ -137,24 +137,23 @@ module createjs { // events change: (event) => any; - // EventDispatcher mixins - addEventListener(type: string, listener: (eventObj: Object) => bool): Function; - addEventListener(type: string, listener: (eventObj: Object) => bool): Object; - removeEventListener(type: string, listener: (eventObj: Function) => bool): void; - removeEventListener(type: string, listener: (eventObj: Object) => bool): void; - removeAllEventListeners(type: string): void; - dispatchEvent(eventObj: string, target: Object): bool; - dispatchEvent(eventObj: Object, target: Object): bool; - hasEventListener(type: string): bool; + // EventDispatcher mixins + addEventListener(type: string, listener: (eventObj: Object) => bool): Function; + addEventListener(type: string, listener: (eventObj: Object) => bool): Object; + removeEventListener(type: string, listener: (eventObj: Function) => bool): void; + removeEventListener(type: string, listener: (eventObj: Object) => bool): void; + removeAllEventListeners(type: string): void; + dispatchEvent(eventObj: string, target: Object): bool; + dispatchEvent(eventObj: Object, target: Object): bool; + hasEventListener(type: string): bool; } - export class MotionGuidePlugin { - // properties - static priority: number; + export class MotionGuidePlugin { + // properties + static priority: number; - //methods - static install(): Object; - - } + //methods + static install(): Object; + } } From 5ab75355904f0483e768bf7992e209263b747516 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 8 Mar 2013 04:27:51 -0800 Subject: [PATCH 5/6] tweenjs: fixed signature of static get() on Tween --- tweenjs/tweenjs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tweenjs/tweenjs.d.ts b/tweenjs/tweenjs.d.ts index 7e424bbbc..7ab5cf350 100644 --- a/tweenjs/tweenjs.d.ts +++ b/tweenjs/tweenjs.d.ts @@ -120,7 +120,7 @@ module createjs { // methods call(callback: (tweenObject: Tween) => any, params?: any[], scope?: Object); // when 'params' isn't given, the callback receives a tweenObject call(callback: (...params: any[]) => any, params?: any[], scope?: Object); // otherwise, it receives the params only - static get(target, props: Object): Tween; + static get(target, props?: Object, pluginData?: Object, override?: bool): Tween; static hasActiveTweens(target? ): void; static installPlugin(plugin: Object, properties: Object): void; pause(tween: Tween): void; From 6acbdec7da19a0ef200a068c4228ed5e2af1250c Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 8 Mar 2013 04:39:01 -0800 Subject: [PATCH 6/6] easeljs: fixed signature of static extractFrame() on SpriteSheetUtils --- easeljs/easeljs.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easeljs/easeljs.d.ts b/easeljs/easeljs.d.ts index 2739c5746..0e6dde9b6 100644 --- a/easeljs/easeljs.d.ts +++ b/easeljs/easeljs.d.ts @@ -567,7 +567,8 @@ module createjs { export class SpriteSheetUtils { static addFlippedFrames(spriteSheet: SpriteSheet, horizontal?: bool, vertical?: bool, both?: bool): void; - static extractFrame(spriteSheet: HTMLImageElement, frame: number): HTMLImageElement; + static extractFrame(spriteSheet: SpriteSheet, frame: number): HTMLImageElement; + static extractFrame(spriteSheet: SpriteSheet, animationName: string): HTMLImageElement; static flip(spriteSheet: HTMLImageElement, flipData: Object): void; static mergeAlpha(rgbImage: HTMLImageElement, alphaImage: HTMLImageElement, canvas?: HTMLCanvasElement): HTMLCanvasElement; }