Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/AsyncMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ function lock(...requests: Array<MultiLockRequest>) {
} else if (descriptor.set != null) {
kind = 'set';
}
const f: Function = descriptor[kind]; // eslint-disable-line @typescript-eslint/ban-types

type AnyFn = (...args: unknown[]) => unknown;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When defining an array type we always use Array<T> and not T[] by convention.


const f = descriptor[kind] as AnyFn;
if (typeof f !== 'function') {
throw new TypeError(`${key} is not a function`);
}
Expand Down