From 08d270fe708df238116cdd25d665e17d7f5304aa Mon Sep 17 00:00:00 2001 From: Evert Bouw Date: Fri, 25 Jan 2019 14:34:38 +0100 Subject: [PATCH] fix(fromEventPattern): improve typings for fromEventPattern --- src/internal/observable/fromEventPattern.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/internal/observable/fromEventPattern.ts b/src/internal/observable/fromEventPattern.ts index 3257d261dc..e027f90839 100644 --- a/src/internal/observable/fromEventPattern.ts +++ b/src/internal/observable/fromEventPattern.ts @@ -1,13 +1,13 @@ import { Observable } from '../Observable'; import { isArray } from '../util/isArray'; import { isFunction } from '../util/isFunction'; -import { fromEvent } from './fromEvent'; +import { NodeEventHandler } from './fromEvent'; import { map } from '../operators/map'; /* tslint:disable:max-line-length */ -export function fromEventPattern(addHandler: (handler: Function) => any, removeHandler?: (handler: Function, signal?: any) => void): Observable; +export function fromEventPattern(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void): Observable; /** @deprecated resultSelector no longer supported, pipe to map instead */ -export function fromEventPattern(addHandler: (handler: Function) => any, removeHandler?: (handler: Function, signal?: any) => void, resultSelector?: (...args: any[]) => T): Observable; +export function fromEventPattern(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void, resultSelector?: (...args: any[]) => T): Observable; /* tslint:enable:max-line-length */ /** @@ -132,8 +132,8 @@ export function fromEventPattern(addHandler: (handler: Function) => any, remo * @owner Observable */ -export function fromEventPattern(addHandler: (handler: Function) => any, - removeHandler?: (handler: Function, signal?: any) => void, +export function fromEventPattern(addHandler: (handler: NodeEventHandler) => any, + removeHandler?: (handler: NodeEventHandler, signal?: any) => void, resultSelector?: (...args: any[]) => T): Observable { if (resultSelector) {