ESNext.SharedMemory still declares the removed Atomics.pause parameter
维护者通常 1 天内回复
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- backend
调研方向
在 tsc/internal/bundled/libs/lib.esnext.sharedmemory.d.ts 中找到 Atomics.pause 的声明。移除它的可选参数,然后使用两个示例调用运行 issue 中的复现命令;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 小时
- 30 天内合并 PR
- 149
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/TypeScript 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
microsoft/TypeScript#65370 ·
维护者通常 1 天内回复
-
Native API: formatDiagnosticsWithColorAndContext drops related information without a file location可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/TypeScript#65087 ·
维护者通常 1 天内回复
-
TS7 LSP: documentHighlight returns nothing when the file path contains '@'可能重新可做 关联的 PR 已关闭且未合并。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/TypeScript#64758 ·
维护者通常 1 天内回复
-
Language server (tsc --lsp) exits with code 1 after `shutdown` and `exit`可能已有人在做 @rajnish-verma-22172 于 16 天前认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 76/100
microsoft/TypeScript#64742 · 1 条评论 ·
维护者通常 1 天内回复
-
Non-enum CLI options with multiple values separated by comma and space aren't whitespace trimmed可能已有人在做 @RyanCavanaugh 于 31 天前认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 68/100
microsoft/TypeScript#64618 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 microsoft/TypeScript 的全部 Issue
相似的 Issue
-
bug tech debt testing
难度 2/5 1-3 小时 新手友好度 76/100
aws/amazon-vpc-cni-k8s#3976 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
txn2/mcp-data-platform#2522 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
open-telemetry/opentelemetry-go-contrib#10234 ·
维护者通常 1 天内回复
-
discovery/backoff: default FindPeers limit yields no fresh peers可能已有人在做 @zakazaka95 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复