Typescript compiler API allows us to process abstract syntax tree (AST) and generate source code. We can do it by creating a printer object and using printNode function
const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
printer.printNode(ts.EmitHint.Unspecified, node, sourceFile))
The problem I'm facing is that my AST contains lots of jsDoc in various places and I want to ignore them and print code without comments. Is there any way to do it without manually traversing the AST and removing jsDoc objects?