You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Native printer panics when printing JSDoc AST nodes #65057
This is the behavior in every version I tried, and I reviewed the FAQ for entries about this. It reproduces on current main of the native (Go) compiler: Printer.emitJSDocNode is still a stub.
⏯ Playground Link
N/A. This is about the native Go printer and the TypeScript 7 JS API (api.printer.printNode), which the Playground does not exercise.
💻 Code
// Using the native API: create a JSDoc node with the factory and print it directly.constdoc=factory.createJSDocComment("Adds two numbers.",factory.createNodeArray([factory.createJSDocParameterTag(factory.createJSDocTag(factory.createIdentifier("param"),undefined),factory.createIdentifier("a"),false,),]),);api.printer.printNode(doc);// panics
The same crash occurs for any JSDoc node kind that the printer dispatches to Printer.emitJSDocNode.
🙁 Actual behavior
The printer dispatches JSDoc node kinds to Printer.emitJSDocNode in tsc/internal/printer/printer.go, which is currently:
The printer should emit a formatted JSDoc comment, including its text and tags, like it does for other node kinds.
Additional information about the issue
I searched open and closed issues and PRs for this and found no other report or PR that implements JSDoc node emission. Open PR #64500 (synthetic comments and emit flags in the API) is related but does not implement emitJSDocNode.
I have a focused fix that I will link here as a PR. Sorry for the missing template in the first version of this issue, and thanks for pointing it out.
Thanks for the pointer, and sorry for skipping the template. I've re-filed this using the bug report template as #65429, and opened a new, narrower PR for it as #65430. Closing this one in favor of those.
Activity
RyanCavanaugh commentedon Nov 9, 2026
Please use a template
el-j commentedon Nov 10, 2026
Thanks for the pointer, and sorry for skipping the template. I've re-filed this using the bug report template as #65429, and opened a new, narrower PR for it as #65430. Closing this one in favor of those.