JSDocTypeLiteral.jsdocPropertyTags returns only the first tag
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
Start with the JSDocPropertyTags definition in tools/scripts/tsc/ast.json and the getter generation in tools/scripts/tsc/generate-encoder.ts; the issue links a related report, #64864. Trace how raw child arrays are encoded and how generated getters handle list properties. Done when jsdocPropertyTags exposes all three tags as a node list while child traversal remains correct; an open pull request is already linked.
索引モデルが issue の本文から書いたものです。
説明
🔎 Search Terms
jsdocPropertyTags, JSDocTypeLiteral, JSDocPropertyTag, typedef property, native API, sync API, NodeList
🕗 Version & Regression Information
This is the behavior in every v7 version I tried: 7.0.2 (typescript/unstable/*), 7.1.0-beta, and 7.1.0-dev.20261021.1. In 6.0, jsDocPropertyTags holds all the tags.
⏯ Playground Link
No response
💻 Code
import {API} from 'typescript/sync';
import {createFileSystem} from 'typescript/fs';
const api = new API({cwd: '/'});
const snapshot = api.createSnapshot({
openProjects: ['/tsconfig.json'],
fileSystem: createFileSystem([
['/tsconfig.json', JSON.stringify({files: ['/input.js'], compilerOptions: {allowJs: true, noLib: true}})],
['/input.js', `/**
* @typedef {Object} Events
* @property {string} a
* @property {string} b
* @property {string} c
*/
export const x = 1;`],
]),
});
const sourceFile = snapshot.getProjects()[0].program.getSourceFile('/input.js');
const literal = sourceFile.statements[0].jsDoc[0].tags[0].typeExpression;
console.log(literal.jsdocPropertyTags.length, literal.jsdocPropertyTags.name?.text);
const walked = [];
literal.forEachChild(node => { walked.push(node.name.text); });
console.log(walked);
api.close();
🙁 Actual behavior
undefined a
[ 'a', 'b', 'c' ]
jsdocPropertyTags is the first JSDocPropertyTag node, not a list. forEachChild still visits all three tags.
🙂 Expected behavior
jsdocPropertyTags is a node list containing all three tags, as jsDocPropertyTags is in 6.0.
Additional information about the issue
JSDocPropertyTags is a raw []*Node in tools/scripts/tsc/ast.json ("list": "raw"), so the encoder writes the tags as direct children of the node, with no NodeList entry. generateTSNodeGenerated in tools/scripts/tsc/generate-encoder.ts only treats nodeList and modifierList as lists, so this property gets a single-node getter that returns child 0.
Possibly related: #64864.
- 主要言語
- Go
- スター
- 112k
- フォーク
- 15.4k
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 136
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TypeScript のほかの issue
-
Native API: formatDiagnosticsWithColorAndContext drops related information without a file locationオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/TypeScript#65087 ·
メンテナーはふだん 1 日以内に返信
-
API: `tsc.exe` opens a visible console window on Windows when the parent process has no consoleオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/TypeScript#65083 ·
メンテナーはふだん 1 日以内に返信
-
TS7 LSP: documentHighlight returns nothing when the file path contains '@'再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン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 が 12 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/TypeScript#64742 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Class names `eval` and `arguments` are not reported as invalid strict mode bindings対応中かも @dmety が 25 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/TypeScript#64661 ·
メンテナーはふだん 1 日以内に返信
microsoft/TypeScript の issue をすべて見る
似ている issue
-
date_time, url_encode, html_escape, to_unix_time, contains_all and contains_any panic when called without arguments対応中かも @antcybersec が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
projectdiscovery/dsl#372 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
JuliusBrussee/caveman#1449 ·
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
openclaw/gogcli#1291 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/arrow-swift#209 ·
メンテナーはふだん 1 日以内に返信
-
bug(instrumentation/kafka-go): producer hook writes trace headers into the caller's messages対応中かも @Aryanbhargava18 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
open-telemetry/opentelemetry-go-compile-instrumentation#1669 ·
メンテナーはふだん 2 日以内に返信