mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fixed method signature of Atomics.waitAsync (#51602)
* Added method overloading for Atomics.waitAsync(Int32Array, number, number, number) * fixed types * fixed types * fixed line ending * CR fix * Forgot the baseline
This commit is contained in:
Vendored
+15
-1
@@ -2,6 +2,20 @@ interface Atomics {
|
||||
/**
|
||||
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
||||
* Waits asynchronously on a shared memory location and returns a Promise
|
||||
* @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.
|
||||
*/
|
||||
waitAsync(typedArray: BigInt64Array | Int32Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> };
|
||||
waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false, value: "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "timed-out"> };
|
||||
|
||||
/**
|
||||
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
||||
* Waits asynchronously on a shared memory location and returns a Promise
|
||||
* @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.
|
||||
*/
|
||||
waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false, value: "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "timed-out"> };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user