From a5a8a6ebfdc3136e9092f1a713f300e42b4ea766 Mon Sep 17 00:00:00 2001 From: Nicholas Jamieson Date: Tue, 7 Nov 2017 10:53:50 +1000 Subject: [PATCH] refactor(ofType): Remove any from typings. --- source/ofType.ts | 4 ++-- source/operator/ofType.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/ofType.ts b/source/ofType.ts index 5f391e5..1c90aed 100644 --- a/source/ofType.ts +++ b/source/ofType.ts @@ -9,7 +9,7 @@ import { filter } from "rxjs/operators/filter"; import { Action, ActionCreator } from "ts-action"; export function ofType>(creator: ActionCreator): (source: Observable>) => Observable; -export function ofType(...creators: ActionCreator[]): (source: Observable>) => Observable>; -export function ofType(...creators: ActionCreator[]): (source: Observable>) => Observable> { +export function ofType(...creators: ActionCreator>[]): (source: Observable>) => Observable>; +export function ofType(...creators: ActionCreator>[]): (source: Observable>) => Observable> { return filter>(action => creators.some(creator => action.type === creator.type)); } diff --git a/source/operator/ofType.ts b/source/operator/ofType.ts index 72cca9c..fe757b5 100644 --- a/source/operator/ofType.ts +++ b/source/operator/ofType.ts @@ -9,7 +9,7 @@ import { Action, ActionCreator } from "ts-action"; import { ofType as higherOrder } from "../ofType"; export function ofType>(this: Observable>, creator: ActionCreator): Observable; -export function ofType(this: Observable>, ...creators: ActionCreator[]): Observable>; -export function ofType(this: Observable>, ...creators: ActionCreator[]): Observable> { - return higherOrder(...creators)(this); +export function ofType(this: Observable>, ...creators: ActionCreator>[]): Observable>; +export function ofType(this: Observable>, ...creators: ActionCreator>[]): Observable> { + return higherOrder(...creators)(this); }