lib: narrow Atomics.wait* target to SharedArrayBuffer views#61817
lib: narrow Atomics.wait* target to SharedArrayBuffer views#61817Renegade334 wants to merge 1 commit intomicrosoft:mainfrom
Atomics.wait* target to SharedArrayBuffer views#61817Conversation
|
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 test it |
|
Hey @jakebailey, the results of running the DT tests are ready. Everything looks the same! |
|
@jakebailey Here are the results of running the user tests with tsc comparing Everything looks good! |
|
@jakebailey Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@jakebailey Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
|
Failed to look at this properly until now. I am shocked this isn't super breaky? |
|
I guess the shared view is often going to appear in a context where its type is inferred, rather than annotated? But yes, somewhat surprising |
|
I searched github for |
The
Atomics.wait*methods only accept views over SharedArrayBuffers, and will throw a TypeError if passed a view on an ArrayBuffer. Since #59417, it's now possible to express this in the method declarations.This change seems like it should have a favourable utility-to-annoyance ratio, but it would be interesting to see what the user tests say.
(The same does not apply to
Atomics.notify(), since although it's a no-op if passed a non-shared view, it accepts the argument and completes gracefully.)