Skip to content

Commit

Permalink
Adjust threejs types (DefinitelyTyped#29893)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewMusgrave authored and sheetalkamat committed Oct 20, 2018
1 parent f109134 commit c65f587
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions types/three/three-core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ export class DirectGeometry extends EventDispatcher {

// EventDispatcher mixins
addEventListener(type: string, listener: (event: Event) => void ): void;
hasEventListener(type: string, listener: (event: Event) => void): void;
hasEventListener(type: string, listener: (event: Event) => void): boolean;
removeEventListener(type: string, listener: (event: Event) => void): void;
dispatchEvent(event: { type: string; [attachment: string]: any; }): void;
}
Expand Down Expand Up @@ -1099,17 +1099,17 @@ export class EventDispatcher {

/**
* Adds a listener to an event type.
* @param type The type of the listener that gets removed.
* @param listener The listener function that gets removed.
* @param type The type of event to listen to.
* @param listener The function that gets called when the event is fired.
*/
addEventListener(type: string, listener: (event: Event) => void ): void;

/**
* Adds a listener to an event type.
* @param type The type of the listener that gets removed.
* @param listener The listener function that gets removed.
* Checks if listener is added to an event type.
* @param type The type of event to listen to.
* @param listener The function that gets called when the event is fired.
*/
hasEventListener(type: string, listener: (event: Event) => void): void;
hasEventListener(type: string, listener: (event: Event) => void): boolean;

/**
* Removes a listener from an event type.
Expand Down Expand Up @@ -1442,7 +1442,7 @@ export class Geometry extends EventDispatcher {

// EventDispatcher mixins
addEventListener(type: string, listener: (event: Event) => void ): void;
hasEventListener(type: string, listener: (event: Event) => void): void;
hasEventListener(type: string, listener: (event: Event) => void): boolean;
removeEventListener(type: string, listener: (event: Event) => void): void;
dispatchEvent(event: { type: string; [attachment: string]: any; }): void;
}
Expand Down
2 changes: 1 addition & 1 deletion types/three/three-orbitcontrols.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class OrbitControls {
// EventDispatcher mixins
addEventListener(type: string, listener: (event: any) => void): void;

hasEventListener(type: string, listener: (event: any) => void): void;
hasEventListener(type: string, listener: (event: any) => void): boolean;

removeEventListener(type: string, listener: (event: any) => void): void;

Expand Down

0 comments on commit c65f587

Please sign in to comment.