TypeScript 0.8: Reviewing Microsoft's Open Source Compiler Preview

Hands-on with the compiler. We explore module mappings, static types, and compile-time integrations.

VP
SHIVAM ITCS
·25 August 2012·10 min read·1 views

The TypeScript Compiler Preview

Following the announcement of TypeScript, Microsoft has released the TypeScript 0.8 compiler preview, inviting web developers to validate its static type safety model.

Let's look at installing the compiler and type-checking JavaScript applications:

bashcode
# Installing the TypeScript compiler preview in 2012
npm install -g typescript

Compiling Typed Code

The compiler evaluates type safety rules and transpiles code down to standard clean JavaScript:

typescriptcode
// C# styled classes in TypeScript 0.8
class Logger {
    log(message: string): void {
        console.log("[LOG]: " + message);
    }
}

Running tsc file.ts outputs a clean JavaScript file playable on any browser, bringing static compilation safety to web development.

VP
Vijay Paliwal
Founder, SHIVAM ITCS · 18+ years enterprise & AI engineering
MCA · Ex-HiveGPT USA · Ex-Social27 Seattle
TypeScript 0.8: Reviewing Microsoft's Open Source Compiler Preview | SHIVAM ITCS Blog | SHIVAM ITCS