ESNext.SharedMemory still declares the removed Atomics.pause parameter
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
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.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/TypeScript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/TypeScript#65370 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Native API: formatDiagnosticsWithColorAndContext drops related information without a file locationCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/TypeScript#65087 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TS7 LSP: documentHighlight returns nothing when the file path contains '@'Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/TypeScript#64758 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Language server (tsc --lsp) exits with code 1 after `shutdown` and `exit`Có thể đã có người làm @rajnish-verma-22172 đã nhận 16 ngày trước. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/TypeScript#64742 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Non-enum CLI options with multiple values separated by comma and space aren't whitespace trimmedCó thể đã có người làm @RyanCavanaugh đã nhận 31 ngày trước. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/TypeScript#64618 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/TypeScript
Issue tương tự
-
bug tech debt testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/amazon-vpc-cni-k8s#3976 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
txn2/mcp-data-platform#2522 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-telemetry/opentelemetry-go-contrib#10234 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
discovery/backoff: default FindPeers limit yields no fresh peersCó thể đã có người làm @zakazaka95 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày