-
Notifications
You must be signed in to change notification settings - Fork 14
Why TypeScript IDE
angelozerr edited this page May 13, 2016
·
2 revisions
It exists 2 famous Eclipse TypeScript
which works well:
So why developping an another Eclipse plugin for TypeScript. What is the difference between typescript.java and those 2 existing plugins?
The main difference are:
- uses tsconfig.json to customize TypeScript Compiler feature.
- based on JSDT: instead of developping an editor from scratch, the TypeScript Editor uses existing JSDT features like syntax coloration, match bracket, etc. The editor will benefit from improvement of JSDT which is very active today (2016). The 2 other plugins have implemented their own editor.
- based on tsserver: tsserver is a TypeScript server which can be started with a line command and provides commands like completion, hover, etc for a TypeScript project configured (or not) with
tsconfig.json
. tsserver uses TypeScript Service API and implementsTypeScript Service Language Host
. tsserver is available when you install typescript (withnpm install typescript
). Consumming tsserver gives the capability to change the version of TypeScript easily and benefit with new features of TypeScript. The 2 other plugins have implemented their own TypeScript Language Host, so when you wish to change version of TypeScript, you must recompile the plugin. - provide an embedded Node.js: when you install TypeScript IDE, it installs an embedded Node.js, so you must not install Node.js in your computer (but you can use your installed Node.js if you wish). This feature is very helpful for company which wish to avoid installing Node.js for each developer computer. You must just install TypeScript IDE and after:
- you can benefit with completion, hover, validation for TypeScript, JSX, JavaScript (Salsa) inside TypeScript Editor by consumming
tsserver
. - you can benefit with compilation of TypeScript to JavaScript by consumming
tsc
. - provide embedded TypeScript: it provides a (the last) typescript bundle which hosts
tsc
andtsserver
so you don't need to install TypeScript. But if you wish you can use an installed TypeScript. This feature is available since TypeScript IDE consummestsc
andtsserver
. -
try to be very fast
: when I have tried TypEcs and Eclipse TypeScript with large project, Eclipse frozen often. The problem of this freeze is was because their TypeScript Editor needs a TypeScript AST to support syntax coloration, code folding, etc. More as they have implemented their own bridge with TypeScript Service Language API, they don't benefit with tsserver feature which are very fast. TypeScript IDE architecture looks like VSCode which is very fast in other words: - syntax coloration, code folding, etc don't use the TypeScript AST which can take time with large TypeScript file. TypeScript IDE uses JSDT token scanner for syntax coloration which is very fast. VSCode works like this: syntax color is done with TextMate, code folding is done with indentation, etc.
- consumes tsserver with timeout in order to avoid freezing Eclipse IDE for a long time. It means that completion doesn't provide result if tsserver takes too time (when it parses files with a lot of TypeScript files). VSCode which consumes
tsserver
works like this.
typescript.java provides the capability to consumes tsserver with Java context, it could be used with other IDE like Netbeans, WebStorm, etc. TypeScript IDE is a set of Eclipse plugins which is based on typescript.java.
- TypeScript IDE
- New and Noteworthy