From b094f321f5ddc4cabfef6b2c4df7e4dbdedceed2 Mon Sep 17 00:00:00 2001 From: Adam Eisenreich Date: Wed, 22 Aug 2018 13:56:00 +0200 Subject: [PATCH] Fixed Element event handler --- types/video.js/index.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/types/video.js/index.d.ts b/types/video.js/index.d.ts index 87407dc81d..75884ffb7d 100644 --- a/types/video.js/index.d.ts +++ b/types/video.js/index.d.ts @@ -2628,7 +2628,8 @@ declare namespace videojs { * the listener function; otherwise, _all_ listeners bound to the * event type(s) will be removed. */ - off(targetOrType?: string | string[], typeOrListener?: (...args: any[]) => void, listener?: (...args: any[]) => void): void; + off(target?: videojs.Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; + off(type?: string | string[], listener?: (...args: any[]) => void): void; /** * Add a listener to an event (or events) on this object or another evented @@ -2653,7 +2654,8 @@ declare namespace videojs { * If the first argument was another evented object, this will be * the listener function. */ - on(targetOrType: string | string[], typeOrListener: (...args: any[]) => void, listener?: (...args: any[]) => void): void; + on(target?: videojs.Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; + on(type?: string | string[], listener?: (...args: any[]) => void): void; /** * Add a listener to an event (or events) on this object or another evented @@ -2678,7 +2680,8 @@ declare namespace videojs { * If the first argument was another evented object, this will be * the listener function. */ - one(targetOrType: string | string[], typeOrListener: (...args: any[]) => void, listener?: (...args: any[]) => void): void; + one(target?: videojs.Component | Element, type?: string | string[], listener?: (...args: any[]) => void): void; + one(type?: string | string[], listener?: (...args: any[]) => void): void; /** * Fire an event on this evented object, causing its listeners to be called.