JSDoc: a nested @property with a type that does not parse drops every nested @property after it
Maintainer thường phản hồi trong vòng 1 ngày
@NullVoxPopuli đang làm issue này rồi.
Từ ngày 29/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/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ệ
- javascript, typescript
- Lĩnh vực
- compilers, testing-qa
Hướng nghiên cứu
Start by tracing how the JSDoc parser handles nested @property tags in the supplied index.js example, then compare its recovery with the flat-property case described in the issue. Use the supplied tsconfig.json and check.ts repro to confirm that only Args.onSave is omitted while Args.onCancel remains in keyof Sig['Args'].
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[!NOTE]
Investigated with Claude (via Claude Code); corrections welcome.
🔎 Search Terms
jsdoc, typedef, nested property, function(, TS1005
🕗 Version & Regression Information
- Works:
6.0.3 - Broken:
7.0.2,7.1.0-beta,7.1.0-dev.20261029.1
CHANGES.md says Closure-style function(...) types are no longer supported, so the TS1005 is expected. This issue is about what happens to the other @property tags in the same typedef.
💻 Code
tsconfig.json
{
"compilerOptions": { "allowJs": true, "checkJs": true, "noEmit": true, "strict": true },
"include": ["index.js", "check.ts"]
}
index.js
/**
* @typedef Sig
* @property {object} Args
* @property {string} Args.name
* @property {function(string)=} Args.onSave
* @property {((v: string) => void)=} Args.onCancel
*/
export {};
check.ts
import type { Sig } from './index.js';
export const a: Array<keyof Sig['Args']> = ['name'];
export const b: Array<keyof Sig['Args']> = ['onSave'];
export const c: Array<keyof Sig['Args']> = ['onCancel'];
🙁 Actual behavior
check.ts(4,45): error TS2322: Type '"onSave"' is not assignable to type '"name"'.
check.ts(5,45): error TS2322: Type '"onCancel"' is not assignable to type '"name"'.
index.js(5,23): error TS1005: '}' expected.
onCancel is also missing, but its type has valid syntax. Every nested property after the one that does not parse is gone.
With flat properties (@property {function(string)=} onSave), only onSave is missing and onCancel is kept. So the problem is in recovery for nested Args.* properties.
🙂 Expected behavior
Only Args.onSave is affected. Args.onCancel is kept, as it is with flat properties.
Additional information about the issue
In real code the only error at the use site is that the property does not exist. For example, a component invocation reports 'onCancel' does not exist in type ..., in a different file from the TS1005. With many typedefs in a codebase, it is hard to connect the two.
- Ngôn ngữ chính
- Go
- Star
- 112k
- Fork
- 15.4k
- Merge trung bình
- 3 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 136
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
-
Won't Fix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/TypeScript#65107 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Native API: formatDiagnosticsWithColorAndContext drops related information without a file locationCó thể đã có người làm @timurzvural đã nhận 1 ngày trước. Đ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 13 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
-
Class names `eval` and `arguments` are not reported as invalid strict mode bindingsCó thể đã có người làm @dmety đã nhận 26 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#64661 ·
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ự
-
area: frontend priority: normal
Độ 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
-
TestAutonomousStop_ReportsObservedState fails under host load: 1s wall-clock ceiling vs 250ms cycleĐang mởtype:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nightgauge/nightgauge#2909 ·
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 62/100
jasonfen/terminal-space-program#842 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MustacheCase/zanadir#521 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
v3.1.0: spread placement groups fail — label key uses the reserved hetzner.cloud prefixCó thể đã có người làm @ScrimReaper đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
stubbi/karpenter-provider-hetzner#120 ·
Maintainer thường phản hồi trong vòng 4 ngày