ESNext.SharedMemory still declares the removed Atomics.pause parameter

Đang mở Phù hợp với người mới
#65,339 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@JemmyIndex đang làm issue này rồi.

Từ ngày 6/11/2026.

  • #65352 của @JemmyIndex — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend

Hướng nghiên cứu

Mở tsc/internal/bundled/libs/lib.esnext.sharedmemory.d.ts tại khai báo Atomics.pause. Xóa tham số tùy chọn của nó, sau đó chạy lệnh tái hiện từ issue với hai lời gọi mẫu; Atomics.pause() sẽ biên dịch thành công và Atomics.pause(1.5) sẽ tạo ra TS2554.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Go
Star
112k
Fork
15.4k
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
149

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/TypeScript

Tất cả issue của microsoft/TypeScript

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.