Skip to content

Instantly share code, notes, and snippets.

@onionmk2
Last active December 10, 2016 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onionmk2/bc69a28ff3069fc3c67bdfa67fcec17c to your computer and use it in GitHub Desktop.
Save onionmk2/bc69a28ff3069fc3c67bdfa67fcec17c to your computer and use it in GitHub Desktop.
typescript環境の備忘録

型定義マネージメントの変遷

  1. tsd 2世代前。
  2. typings 1世代前。
  3. @types 今の方法。

@types とは

http://qiita.com/laco0416/items/ed1aadf335f12cd3618d

npm install -D @types/angularjs とか
yarn add @types/angularjs でつかえる。

DefinitelyTypedとは

デファクトの型定義置き場のこと https://github.com/DefinitelyTyped/DefinitelyTyped

ビルドの仕方

  1. tsc コマンド. コマンドラインでビルドしたいとき
  2. ts-loader. webpackでビルドしたいとき
  3. tsfify. browserifyでビルドしたいとき

tsconfig.json とは

上記3つのビルド方法で共通してつかえる、ビルドのオプションファイル
IDEでもつかえる。

どんなオプションが有る?

http://www.typescriptlang.org/docs/handbook/compiler-options.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment