Emacs で TypeScript を auto-complete 使ってコード補完

Services.TypeScriptServicesFactory() 経由で補完情報を取れたのでそれを auto-complete につなげた。
公式の TypeScript.el だと (typescript-mode-hook) のフックが無いのでそっちも更新。

今のところ同一ファイルか lib.d.ts で定義されたメンバーだけ使ってる。
https://github.com/zakki/auto-complete-ts


補完のたびに node を起動して JSON で情報を取得しているけど、本来は処理系に差分更新モードがあるっぽいので Vim でやってるところのようにサーバーモードで動作するほうがいいのかも。
http://vividcode.hatenablog.com/entry/ts/how-to-completion

$ node.exe isense.js --line 4 --col 23 --libdir $(cygpath -m ~/ts/typescript/typings) test/getCompletionsAtPosition1.ts|sed 's/},/\n/g'|head
{"pos":83,"signature":null,"member":{"maybeInaccurate":false,"isMemberCompletion
":true,"entries":[{"name":"pubMeth","type":"() => void","kind":"method","kindMod
ifiers":"public"
{"name":"pubProp","type":"any","kind":"property","kindModifiers":"public"
{"name":"privMeth","type":"() => void","kind":"method","kindModifiers":"private"

{"name":"privProp","type":"string","kind":"property","kindModifiers":"private"}]

"nomember":{"maybeInaccurate":false,"isMemberCompletion":false,"entries":[{"name
":"toString","type":"() => string","kind":"method","kindModifiers":"declare"
{"name":"PropertyDescriptor","type":"PropertyDescriptor","kind":"interface","kin