ESNext.SharedMemory still declares the removed Atomics.pause parameter

Offen Anfängerfreundlich
#65,339 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@JemmyIndex arbeitet bereits daran.

Seit 06.11.2026.

  • #65352 von @JemmyIndex — offen

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
88/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
backend

Rechercherichtung

Öffne tsc/internal/bundled/libs/lib.esnext.sharedmemory.d.ts bei der Deklaration von Atomics.pause. Entferne den optionalen Parameter und führe dann den Reproduktionsbefehl aus dem Issue mit den beiden Beispielaufrufen aus; Atomics.pause() sollte kompilieren und Atomics.pause(1.5) sollte TS2554 ausgeben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

⚙ Compilation target

ES5

⚙ Library

es2026,esnext.sharedmemory

Missing / Incorrect Definition

I came across a minor mismatch in the bundled declaration while checking the TypeScript 7.1 beta.

lib.esnext.sharedmemory.d.ts declares Atomics.pause(n?: number): void. The ECMAScript draft defines Atomics.pause() with no parameters.

Reproduced with TypeScript 7.1.0-beta and 7.1.0-dev.20261105.1. The command below accepts both calls without diagnostics. The first call should compile, and the second should report TS2554.

To reproduce locally, save the sample as repro.ts in an empty directory and run the following command there.

npx --yes [email protected] tsc --noEmit --strict --lib es2026,esnext.sharedmemory repro.ts

In the bundled declaration, remove the optional parameter.

-    pause(n?: number): void;
+    pause(): void;

With only that line changed in a temporary install of the nightly, the same command reports the following diagnostic. With only the first call in the file, the patched compiler exits successfully without diagnostics.

repro.ts(2,15): error TS2554: Expected 0 arguments, but got 1.
Sample Code
Atomics.pause()
Atomics.pause(1.5)
Documentation Link

If you confirm this issue I can create a PR with the fix.

Vorherrschende Sprache
Go
Sterne
112k
Forks
15.4k
Ø Merge
3 T. 2 Std.
Gemergte PRs (30 T.)
149

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/TypeScript

Alle Issues in microsoft/TypeScript

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.