Typescript's printer automatically inserts semicolons, despite having omitTrailingSemicolon: true.
How do I prevent this behavior?
const file = ts.createSourceFile(
"file",
'const b = "asd"',
ts.ScriptTarget.Latest,
true,
ts.ScriptKind.TS
);
const printer = ts.createPrinter({
omitTrailingSemicolon: true,
removeComments: false,
newLine: ts.NewLineKind.LineFeed,
});
const printed = printer.printFile(file);
// const b = "asd";\n