Formatting

This commit is contained in:
Andras Schmelczer 2025-06-01 09:51:33 +01:00
parent 2cdf2ba74e
commit 22cafda53f
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
4 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,7 @@
/**
* A type-safe utility function to create a Promise with resolve and reject functions.
* @returns A tuple containing a Promise, a resolve function, and a reject function.
*/
export function createPromise<T = void>(): [
Promise<T>,
(value: T) => void,

View file

@ -5,7 +5,7 @@ import type { Logger } from "../tracing/logger";
// Locks are granted in a first-in-first-out order.
export class Locks<T> {
private readonly locked = new Set<T>();
private readonly waiters = new Map<T, (() => void)[]>();
private readonly waiters = new Map<T, (() => unknown)[]>();
public constructor(private readonly logger: Logger) {}