Optional setter JSDoc is mistaken for optional executable syntax
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #3044 @MathurAditya724 による — マージされずにクローズ
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript, wasm
- 領域
- compilers
調査の方向性
Start with the JSDoc setter parameter handling that emits TS1051, then inspect the setter lowering and regression tests; the issue names no source files or test entry points. Reproduce with the setter.mjs example and compare against Node 24.22.1. Done means optional JSDoc names no longer change setter arity, executable optional and rest forms still receive their existing refusals, and regression tests cover accessors, arguments, inheritance, and native behavior.
索引モデルが issue の本文から書いたものです。
説明
We are compiling the full Sentry CLI with scriptc while retaining the Symbolic WASM wrapper used for debug-file handling. Five generated setters are rejected because their JSDoc marks the accepted value as optional, even though each executable setter has one ordinary parameter.
A reduced example is:
class Box {
/** @param {string | null} [next] */
set value(next) {
console.log(next);
}
}
new Box().value = null;
Save this as setter.mjs. Node 24.22.1 prints null. scriptc built from current main reports A 'set' accessor cannot have an optional parameter (TS1051 / SC0001). The diagnostic points inside [next] in the comment. There is no optional parameter token in the setter's executable syntax.
Expected behavior is to distinguish erased JSDoc optionality from an actually optional setter parameter. The comment should not change the setter's declared arity, and ordinary property assignments of null or undefined should follow the same runtime behavior as Node. The existing refusals for executable setter parameter forms should remain unchanged by this comment-specific fix. This includes optional and rest syntax, and the separate default-initializer case that scriptc does not yet lower exactly. Authored TypeScript checks should also remain intact.
The generated wrapper includes getter/setter pairs, so accepting the comment alone is not enough: regression tests should check setter-only properties, matching getter/setter pairs, argument handling and inheritance, with native differential execution. Any signature normalization must preserve the actual read and write behavior.
I checked existing work before filing. #2758 handles TS7032 for unannotated setters, while #2927 discusses the separate TS1052 default-initializer case. Neither addresses TS1051 inside an optional JSDoc name. Resolving this case removes the first five observed setter diagnostics, rather than proving that every later WASM-wrapper path works.
- 主要言語
- TypeScript
- スター
- 6.5k
- フォーク
- 212
- 平均マージ
- 13時間 2分
- マージ済み PR(30日)
- 798
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel-labs/scriptc のほかの issue
-
Discarded negation of a void call rejects valid JavaScript対応中かも @MathurAditya724 が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 1/100
vercel-labs/scriptc#3358 ·
メンテナーはふだん 1 日以内に返信
-
Optional JSDoc rejects mandatory JavaScript setter parameters対応中かも @MathurAditya724 が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
vercel-labs/scriptc#3355 ·
メンテナーはふだん 1 日以内に返信
-
Correct JavaScript refusal descriptions for mutable bindings and missing properties対応中かも @MathurAditya724 が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
vercel-labs/scriptc#3354 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
vercel-labs/scriptc#3330 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
vercel-labs/scriptc#3210 ·
メンテナーはふだん 1 日以内に返信
vercel-labs/scriptc の issue をすべて見る
似ている issue
-
Add: Shop On TV SDオープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
bug implicit-state
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
book-layout.spec fails when the similar-books rail holds other projects' books対応中かも @praetorianer777 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
praetorianer777/GoTome#373 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Tencent/tdesign-react#4465 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:cards enhancement ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
fil-donadoni/tolaria#8883 ·
メンテナーはふだん 1 日以内に返信