← Back to Tutorial
TypeScript Compiler
TypeScript Code
Clear
Compile ▶
// Building a distributable TypeScript library function greet(name: string): string { return `Hello, ${name}!`; } class Counter { private count: number = 0; increment(): void { this.count++; } getCount(): number { return this.count; } } export { greet, Counter };
Output
Download JS
TypeScript code will be compiled here