From c65f587f017948e2076ce5083bae149066941b16 Mon Sep 17 00:00:00 2001 From: Andrew Musgrave Date: Fri, 19 Oct 2018 20:02:38 -0400 Subject: [PATCH] Adjust threejs types (#29893) --- types/three/three-core.d.ts | 16 ++++++++-------- types/three/three-orbitcontrols.d.ts | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/types/three/three-core.d.ts b/types/three/three-core.d.ts index e2dc2aacd608be..3ab89ea5a9bf34 100755 --- a/types/three/three-core.d.ts +++ b/types/three/three-core.d.ts @@ -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; } @@ -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. @@ -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; } diff --git a/types/three/three-orbitcontrols.d.ts b/types/three/three-orbitcontrols.d.ts index 272b8410c48ead..1d4979217fcb2e 100644 --- a/types/three/three-orbitcontrols.d.ts +++ b/types/three/three-orbitcontrols.d.ts @@ -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;