Skip to content

Commit

Permalink
feat: make LockBox default to Lockable for its type parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
CMCDragonkai committed Jun 28, 2022
1 parent cdbe3fe commit fe20a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LockBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Lockable, ToString, LockRequest } from './types';
import { withF, withG } from '@matrixai/resources';
import { ErrorAsyncLocksLockBoxConflict } from './errors';

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

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

0 comments on commit fe20a4f

Please sign in to comment.