TypeScript 的 Eclipse 插件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12692306/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse plugin for TypeScript?
提问by Eran Medan
The new Microsoft TypeScriptlanguage (typed superset of JavaScript) seems very interesting, is there any alpha / incubator project that attempts to support it in Eclipse? Or is it too early to even wish for it
新的 Microsoft TypeScript语言(JavaScript 的类型化超集)似乎很有趣,是否有任何 alpha / incubator 项目试图在 Eclipse 中支持它?或者现在还为时过早
采纳答案by Eran Medan
回答by irbull
This question was asked the day TypeScript was released, so as of today (Oct 2nd 2012), there is no support. Having said that, the XTextteam -- a team responsible for rapidly creating DSLs -- is aware of TypeScript and I wouldn't be surprised if they do something.
这个问题是在 TypeScript 发布的那天被问到的,所以截至今天(2012 年 10 月 2 日),没有支持。话虽如此,XText团队——一个负责快速创建 DSL 的团队——知道 TypeScript,如果他们做点什么,我不会感到惊讶。
Another place to look is Microsoft. Depending on what their motivation is with TypeScript, they may push for an Eclipse project (although I doubt it).
另一个值得关注的地方是微软。根据他们使用 TypeScript 的动机,他们可能会推动 Eclipse 项目(尽管我对此表示怀疑)。
回答by JBaron
Orion (the web based eclipse ide) would be a good fit. It is already using nodejs, so it would be easier to incorporate tsc and the language services. Right now they already support Javascript including some type inference. I understood typescript is on their radar.
Orion(基于 Web 的 Eclipse ide)将是一个不错的选择。它已经在使用 nodejs,所以合并 tsc 和语言服务会更容易。现在他们已经支持 Javascript,包括一些类型推断。我知道打字稿在他们的雷达上。
回答by rob
Looks like the beta of an Eclipse Typescript plugin was uploaded on Aug 7 2013. I haven't had a chance to try it out yet but it looks promising.
看起来 Eclipse Typescript 插件的测试版是在 2013 年 8 月 7 日上传的。我还没有机会尝试它,但它看起来很有希望。
http://marketplace.eclipse.org/content/typescript#.UgfEuD9IG-V
http://marketplace.eclipse.org/content/typescript#.UgfEuD9IG-V
回答by thSoft
Until a specific plugin is implemented, if you are adventurous enough, you might try and just use JSDT and associate *.ts files with the JavaScript editor. If you get JavaScript validation errors, disable the JavaScript Validator under Project > Properties > Builders. For automatic TypeScript compiling, you can set up an external builder as described hereor here. My settings:
在实现特定插件之前,如果您足够冒险,您可以尝试仅使用 JSDT 并将 *.ts 文件与 JavaScript 编辑器相关联。如果您收到 JavaScript 验证错误,请在 Project > Properties > Builders 下禁用 JavaScript Validator。对于自动 TypeScript 编译,您可以按照此处或此处所述设置外部构建器。我的设置:
- Main
- Location: /usr/local/bin/tsc
- Working directory: ${build_project}
- Arguments: ${build_files:f}
- Refresh
- Refresh resources upon completion: checked
- The folder containing the selected resource
- Environment
- PATH = /user/local/bin
- Build Options
- Allocate console: checked
- Run the builder: During auto builds
- Specify Resources: a folder that contains *.ts files
- 主要的
- 位置:/usr/local/bin/tsc
- 工作目录:${build_project}
- 参数:${build_files:f}
- 刷新
- 完成后刷新资源:选中
- 包含所选资源的文件夹
- 环境
- 路径 = /user/local/bin
- 构建选项
- 分配控制台:选中
- 运行构建器:在自动构建期间
- 指定资源:包含 *.ts 文件的文件夹