From 3b6696cbb2f1e6f2d87e648026814a56d6c71e10 Mon Sep 17 00:00:00 2001 From: CDeltakai Date: Thu, 15 May 2025 20:12:14 +1000 Subject: [PATCH] fix: replaced blanket Function with AnyFn --- src/AsyncMonitor.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/AsyncMonitor.ts b/src/AsyncMonitor.ts index ee28e93..486bc9f 100644 --- a/src/AsyncMonitor.ts +++ b/src/AsyncMonitor.ts @@ -56,7 +56,10 @@ function lock(...requests: Array) { } else if (descriptor.set != null) { kind = 'set'; } - const f: Function = descriptor[kind]; // eslint-disable-line @typescript-eslint/ban-types + + type AnyFn = (...args: unknown[]) => unknown; + + const f = descriptor[kind] as AnyFn; if (typeof f !== 'function') { throw new TypeError(`${key} is not a function`); }