TypeScript
You do not obfuscate TypeScript. You obfuscate what it emits.
TypeScript never reaches a browser or a server — it compiles away. Types are erased, and what ships is plain, readable JavaScript carrying every string, endpoint, and rule you wrote. “It’s TypeScript, it’s compiled” is one of the most expensive misconceptions in front-end security. Protect the output, and stop publishing the map that points back to your source.
The Fastest Own-Goal
app.js + app.js.map = your .ts source
Ship a source map next to a protected bundle and you have published the original TypeScript — names, structure, and with inlineSources, the literal file text.
Types eraseInterfaces vanish. They protect nothing at runtime.
Enums persistRegular enum member names ship as string literals.
Maps stay privateGenerate them, keep them, never deploy them.