Skip to content

Commit fe20a4f

Browse files
committed
feat: make LockBox default to Lockable for its type parameter
1 parent cdbe3fe commit fe20a4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LockBox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Lockable, ToString, LockRequest } from './types';
33
import { withF, withG } from '@matrixai/resources';
44
import { ErrorAsyncLocksLockBoxConflict } from './errors';
55

6-
class LockBox<L extends Lockable> implements Lockable {
6+
class LockBox<L extends Lockable = Lockable> implements Lockable {
77
protected _locks: Map<string, L> = new Map();
88

99
public lock(...requests: Array<LockRequest<L>>): ResourceAcquire<LockBox<L>> {

0 commit comments

Comments
 (0)