Skip to content

Commit

Permalink
Update definition file.
Browse files Browse the repository at this point in the history
  • Loading branch information
troyedwardsjr committed Mar 23, 2018
1 parent 192b068 commit a993e54
Showing 1 changed file with 90 additions and 1 deletion.
91 changes: 90 additions & 1 deletion src/phaser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5564,6 +5564,76 @@ declare namespace Phaser {
*/
destroy(): void;

/**
* Return an array listing the events for which the emitter has registered listeners.
*/
eventNames(): any[];

/**
* Return the listeners registered for a given event.
* @param event The event name.
*/
listeners(event: string | symbol): any[];

/**
* Return the number of listeners listening to a given event.
* @param event The event name.
*/
listenerCount(event: string | symbol): number;

/**
* Calls each of the listeners registered for a given event.
* @param event The event name.
*/
emit(event: string | symbol): Boolean;

/**
* Add a listener for a given event.
* @param event The event name.
* @param fn The listener function.
* @param context The context to invoke the listener with. Default this.
*/
on(event: string | symbol, fn: Function, context?: any): EventEmitter;

/**
* Add a listener for a given event.
* @param event The event name.
* @param fn The listener function.
* @param context The context to invoke the listener with. Default this.
*/
addListener(event: string | symbol, fn: Function, context?: any): EventEmitter;

/**
* Add a one-time listener for a given event.
* @param event The event name.
* @param fn The listener function.
* @param context The context to invoke the listener with. Default this.
*/
once(event: string | symbol, fn: Function, context?: any): EventEmitter;

/**
* Remove the listeners of a given event.
* @param event The event name.
* @param fn Only remove the listeners that match this function.
* @param context Only remove the listeners that have this context.
* @param once Only remove one-time listeners.
*/
removeListener(event: string | symbol, fn: Function, context: any, once: boolean): EventEmitter;

/**
* Remove the listeners of a given event.
* @param event The event name.
* @param fn Only remove the listeners that match this function.
* @param context Only remove the listeners that have this context.
* @param once Only remove one-time listeners.
*/
off(event: string | symbol, fn: Function, context: any, once: boolean): EventEmitter;

/**
* Remove all listeners, or those of the specified event.
* @param event The event name.
*/
removeAllListeners(event?: string | symbol): EventEmitter;
}

}
Expand Down Expand Up @@ -23440,7 +23510,7 @@ declare namespace Phaser {
* @param path Optional texture file specific XHR settings.
* @param xhrSettings Optional atlas file specific XHR settings.
*/
function SpriteSheetFile(key: string, url: string, config: object, path: string, xhrSettings?: Phaser.Loader.XHRSettings): object;
function SpriteSheetFile(key: string, url: string, config: object, path: string, xhrSettings?: Phaser.Loader.XHRSettings): LoaderPlugin;

/**
* A Tilemap File.
Expand Down Expand Up @@ -23940,6 +24010,25 @@ declare namespace Phaser {
*/
script(key: string, url: string, xhrSettings?: Phaser.Loader.XHRSettings): Phaser.Loader.LoaderPlugin;

/**
* Adds a Spritesheet to the current load queue.
*
*
*
* Note: This method will only be available if the Spritesheet File type has been built into Phaser.
*
*
*
* The file is **not** loaded immediately after calling this method.
*
* Instead, the file is added to a queue within the Loader, which is processed automatically when the Loader starts.
* @param key [description]
* @param url [description]
* @param config [description]
* @param xhrSettings [description]
*/
spritesheet(key: string, url: string, config: object, xhrSettings?: Phaser.Loader.XHRSettings): Phaser.Loader.LoaderPlugin;

/**
* Adds an SVG file to the current load queue.
*
Expand Down

0 comments on commit a993e54

Please sign in to comment.