Transforming TypeScript into JavaScript

前端 未结 11 1273
再見小時候
再見小時候 2020-12-08 02:01

I\'m wondering how is it possible to transform the TypeScript into JavaScript in a cross platform manner. I\'m aware about availability of node package manager for typescrip

11条回答
  •  -上瘾入骨i
    2020-12-08 02:36

    SublimeText2 Trick You can transpile typescript to javascript directly from SublimeText2 (you need node) :

    Create a Typescript.sublime-build file in /Sublime Text 2/Packages/User with this content :

    {
    "cmd": ["tsc", "$file"],
    "selector" : "source.ts",
    "path": "/usr/local/bin:$PATH"
    }
    

    then, now, you can transpile your code with ctrl+B or cmd+B

提交回复
热议问题