<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with the latest published version. It may have already been fixed. For npm: `typescript@next` This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly --> **TypeScript Version:** typescript@3.8.0-dev.20191105 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** compilar api **Code** ```ts fs.writeFileSync( "out", ts .createPrinter() .printFile( ts.createSourceFile( "test.ts", fs.readFileSync("in", { encoding: "utf8" }), ts.ScriptTarget.ESNext, undefined, ts.ScriptKind.TSX ) ) ) ``` in ``` <a x="\\"/> ``` **Expected behavior:** out ``` <a x="\\"/> ``` **Actual behavior:** out ``` <a x="\\\\"/> ``` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> **Related Issues:** <!-- Did you find other bugs that looked similar? -->