TypeScriptは、JavaScriptを生成するためのいわゆるAltJSと呼ばれる言語の1つで、マイクロソフトがオープンソースとして開発しています。WebアプリケーションのフレームワークAngular 2はTypeScriptで開発されていることが知られています。 TypeScriptは、JavaScriptを大規模なアプリケーション開発にも対応できるようにしたもの。コードを静的解析することでバグを発見しやすいような変数の型付けなどの構文を備えています。 TypeScript 2.0の主な新機能として、JavaScriptでバグの発生要因になりやすかったNull値やUndefined値を変数の値として持てないようにする「Non-nullable Types」機能を搭載。 また、Union型(共用体)ではF#やSwift、Rustのように変数にタグ付ができるタグ付共用体などをサポート。