ESNext.SharedMemory still declares the removed Atomics.pause parameter

オープン 初心者向け
#65,339 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@JemmyIndex がすでに取り組んでいます。

2026年11月6日 から。

  • #65352 @JemmyIndex による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
backend

調査の方向性

tsc/internal/bundled/libs/lib.esnext.sharedmemory.d.ts を開き、Atomics.pause の宣言を確認します。省略可能なパラメーターを削除し、issue の再現コマンドを 2 つの呼び出し例とともに実行します。Atomics.pause() はコンパイルに成功し、Atomics.pause(1.5) は TS2554 を出力するはずです。

索引モデルが issue の本文から書いたものです。

説明

⚙ 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.

主要言語
Go
スター
112k
フォーク
15.4k
平均マージ
3日 2時間
マージ済み PR(30日)
149

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TypeScript のほかの issue

microsoft/TypeScript の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。