-
-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
Describe the bug
When emitting TypeScript declarations, JSDoc comments attached to object properties (in either interface or type declarations) are indented incorrectly.
Given the following source:
export interface Options {
/**
* interface member
*/
foo: string
}The generated output is:
interface Options {
/**
* interface member
*/
foo: string;
}
export { type Opttions };Notice that the leading * inside the JSDoc block is over-indented, which breaks formatting and readability.
Expected output
interface Options {
/**
* interface member
*/
foo: string
}
export { type Opttions };Diff
interface Options {
/**
- * interface member
- */
+ * interface member
+ */
foo: string;
}Reproduction
System Info
System:
OS: Windows 11 10.0.22631
CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
Memory: 1.01 GB / 31.91 GB
Binaries:
Node: 24.13.0 - C:\Program Files\nodejs\node.EXE
npm: 11.7.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.28.0 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Chrome: 143.0.7499.193
Edge: Chromium (140.0.3485.54)
Firefox: 146.0.1 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.22621.3527Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.
Contributions
- I am willing to submit a PR to fix this issue
- I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels