Add lib.esnext.sharedmemory (#61646)

This commit is contained in:
René
2025-06-06 21:33:13 +01:00
committed by GitHub
parent 51dcd9001d
commit 652ed7fea0
93 changed files with 1277 additions and 981 deletions

View File

@@ -249,6 +249,7 @@ const libEntries: [string, string][] = [
["esnext.promise", "lib.esnext.promise.d.ts"],
["esnext.float16", "lib.esnext.float16.d.ts"],
["esnext.error", "lib.esnext.error.d.ts"],
["esnext.sharedmemory", "lib.esnext.sharedmemory.d.ts"],
["decorators", "lib.decorators.d.ts"],
["decorators.legacy", "lib.decorators.legacy.d.ts"],
];

View File

@@ -1452,6 +1452,9 @@ export const getScriptTargetFeatures: () => ScriptTargetFeatures = /* @__PURE__
es2024: [
"waitAsync",
],
esnext: [
"pause",
],
})),
SharedArrayBuffer: new Map(Object.entries({
es2017: [

1
src/lib/esnext.d.ts vendored
View File

@@ -8,3 +8,4 @@
/// <reference lib="esnext.promise" />
/// <reference lib="esnext.float16" />
/// <reference lib="esnext.error" />
/// <reference lib="esnext.sharedmemory" />

7
src/lib/esnext.sharedmemory.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
interface Atomics {
/**
* Performs a finite-time microwait by signaling to the operating system or
* CPU that the current executing code is in a spin-wait loop.
*/
pause(n?: number): void;
}

View File

@@ -88,6 +88,7 @@
"esnext.promise",
"esnext.float16",
"esnext.error",
"esnext.sharedmemory",
"decorators",
"decorators.legacy",
// Default libraries