We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3e4734d + 3b6696c commit 377ce02Copy full SHA for 377ce02
src/AsyncMonitor.ts
@@ -56,7 +56,10 @@ function lock(...requests: Array<MultiLockRequest>) {
56
} else if (descriptor.set != null) {
57
kind = 'set';
58
}
59
- const f: Function = descriptor[kind]; // eslint-disable-line @typescript-eslint/ban-types
+
60
+ type AnyFn = (...args: unknown[]) => unknown;
61
62
+ const f = descriptor[kind] as AnyFn;
63
if (typeof f !== 'function') {
64
throw new TypeError(`${key} is not a function`);
65
0 commit comments