LoginSignup
0
0

More than 5 years have passed since last update.

Visual Studio 15 Preview 4 でtypescript2.0を試す。

Last updated at Posted at 2016-08-27

「The Visual Studio Blog」の8月22日の記事に、 Visual Studio 15 Preview 4 で、typescript2.0(β)が試せるよと書いてあったのでお試ししてみた。

上記事から直リンクはられているVisual Studio 15 Preview 4のインストーラー(vs bootstrapper)をダウンロードして実行すると、以下のような画面が立ち上がる。VS15.PNG

いろいろ書いているけれど、typescript2.0をお試しするには、node.jsのところだけを選んでおけば良い(ついでに興味があるものを入れてみても良い。自分の場合はpythonも入れてみる)。

VS151.PNG

インストール後、起動してみて、nodeJSの基本プロジェクトを立ちあげ、typescript2.0で導入される、option型を書いて実行してみる。
なにか、言われるが、、

VS152.PNG*

そのまま実行すると、option型を含むコードが動作した。
*#typescript2.0そのものの紹介記事はこちら

VS153.PNG

逆に、こちらにあるように、初期化していない配列にアクサスしてみると、ちゃんとエラーが出る。
VS154.PNG

ということで、型あり言語として一歩進んだtypescript2.0、 Visual Studio 15 Preview 4 で今すぐ試せるよと、ということでした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0