Remove comments and redundant whitespace from TypeScript for a compact preview.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Comments and unnecessary spacing are removed while strings, template literals, and TypeScript syntax are protected. The result is compact source-like text rather than type-aware compiler output.
function add(a: number, b: number): number {
return a + b;
}
function add(a,b){return a+b;}
Bundle experiments, playground snippets, and generated-file reviews minify TypeScript.