typescript : tsd 定義ファイル管理

tsdで定義ファイルを管理します。
バージョンの確認が必要ですね

$ sudo npm install -g tsd

$ tsd init

$ tsd query node -v all

>> tsd 0.5.7

- node/node-0.10.d.ts : : 2015-03-15 14:36

- node/node-0.11.d.ts : : 2015-03-15 14:36

- node/node-0.8.8.d.ts : : 2015-03-15 14:36

- node/node.d.ts : : 2015-03-15 14:36

$ node -v
v0.10.33

$ tsd query node -v '=0.10'

>> tsd 0.5.7

- node/node-0.10.d.ts : : 2015-03-15 14:36

$ tsd query node -v '=0.10' -a install
$ tsd query node -v '=0.10' -a install -os
>> tsd 0.5.7

- node/node-0.10.d.ts : : 2015-03-15 14:36

>> running install..

>> written 1 file:

- node/node-0.10.d.ts

$ tree typings/
typings/
├── express
│   └── express.d.ts
├── node
│   └── node-0.10.d.ts
└── tsd.d.ts

$ cat tsd.json
{
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"node/node-0.10.d.ts": {
"commit": "95d860879fb90c405aeb13eea7b8564f9c0df2bf"
},
"express/express.d.ts": {
"commit": "95d860879fb90c405aeb13eea7b8564f9c0df2bf"
}
}
}

こんな感じで
express.d.tsで呼ばれているnode.d.tsは不要なので、コメントアウト

$ tsc –module commonjs test.js

でコンパイルできました。
これをgruntに入れておきます。

This entry was posted on 月曜日, 3月 16th, 2015 at 9:13 AM and is filed under Javascript, node.js, Typescript. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。