Skip to content

Commit

Permalink
Change isListenerObject signature to just use any
Browse files Browse the repository at this point in the history
  • Loading branch information
MSNev committed Mar 8, 2023
1 parent 492ffab commit e55a52c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/opentelemetry-context-zone-peer-dep/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@
* limitations under the License.
*/

import { TargetWithEvents } from './types';

/**
* check if an object has addEventListener and removeEventListener functions then it will return true.
* Generally only called with a `TargetWithEvents` but may be called with an unknown / any.
* @param obj - The object to check.
*/
export function isListenerObject(obj: TargetWithEvents | any = {}): boolean {
export function isListenerObject(obj: any = {}): boolean {
return (
typeof obj.addEventListener === 'function' &&
typeof obj.removeEventListener === 'function'
Expand Down

0 comments on commit e55a52c

Please sign in to comment.