Skip to content

Conversation

@Eyal-Shalev
Copy link
Contributor

#49204 Added typing for Atomics.waitAsync, but it assumed that the value will be of type BigInt even though (according to MDN) it can also be a number (if the typed array is Int32Array)

@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 20, 2022
@Eyal-Shalev
Copy link
Contributor Author

@microsoft-github-policy-service agree

* @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: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> };
Copy link
Contributor

@Josh-Cena Josh-Cena Nov 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, in the latest proposal, the return value looks like

{ async: false, value: "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "timed-out"> }

But I couldn't test this.

@sandersn sandersn merged commit 5435efb into microsoft:main Dec 2, 2022
@Eyal-Shalev Eyal-Shalev deleted the bugfix/es2022SharedMemory branch December 2, 2022 07:54
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants