From 5f72983c95377b21ddcb757809f6e1423074bc46 Mon Sep 17 00:00:00 2001 From: Yogesh Kumar Date: Mon, 10 Aug 2026 12:57:42 +0530 Subject: [PATCH] lib: fix Atomics.waitAsync timeout parameter description Both waitAsync overloads document their timeout parameter as "The expected value to test", which is the description of the value parameter directly above it. The parameter is not a value to test against; it is how long to wait before the operation settles with "timed-out". Also drop the brackets from `@param [timeout]`. These two lines were the only use of the optional-parameter bracket form under src/lib, and the optionality is already expressed by `timeout?: number` in the signature. --- src/lib/es2024.sharedmemory.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/es2024.sharedmemory.d.ts b/src/lib/es2024.sharedmemory.d.ts index 672c714508b0d..4a71aece91872 100644 --- a/src/lib/es2024.sharedmemory.d.ts +++ b/src/lib/es2024.sharedmemory.d.ts @@ -7,7 +7,8 @@ interface Atomics { * @param typedArray A shared Int32Array or BigInt64Array. * @param index The position in the typedArray to wait on. * @param value The expected value to test. - * @param [timeout] The expected value to test. + * @param timeout The number of milliseconds to wait before the operation times out. + * Defaults to `Infinity`. */ waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; @@ -17,7 +18,8 @@ interface Atomics { * @param typedArray A shared Int32Array or BigInt64Array. * @param index The position in the typedArray to wait on. * @param value The expected value to test. - * @param [timeout] The expected value to test. + * @param timeout The number of milliseconds to wait before the operation times out. + * Defaults to `Infinity`. */ waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; }; }