From e27732021e19d3338cdfe5c7a6d4ac194baca00a Mon Sep 17 00:00:00 2001 From: Ifiok Jr Date: Tue, 16 Apr 2019 16:10:22 +0100 Subject: [PATCH] style: simplify AnyFunction --- types/throttleit/index.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/throttleit/index.d.ts b/types/throttleit/index.d.ts index fd0c20f2d1..62f3786708 100644 --- a/types/throttleit/index.d.ts +++ b/types/throttleit/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -type AnyFunction = (...args: any[]) => R; +type AnyFunction = (...args: any[]) => any; /** * Returns a new function that, when invoked, invokes `func` at most once per `wait` milliseconds. @@ -13,6 +13,9 @@ type AnyFunction = (...args: any[]) => R; * @param wait Number of milliseconds that must elapse between `func` invocations. * @return A new function that wraps the `func` function passed in. */ -declare function throttle(fn: GFunction, wait: number): GFunction; +declare function throttle( + fn: GFunction, + wait: number, +): GFunction; export = throttle;