TypeScript is a new open and interoperable language for application scale JavaScript development created by Microsoft and released as open source on CodePlex. You can learn about this typed superset of JavaScript that compiles to plain JavaScript reading Soma’s blog.
At Microsoft Open Technologies, Inc. we are thrilled that the discussion is now open with the community on the language specification: you can play (or even better start developing with TypeScript) with the bits, read the specification and provide your feedback on the discussion forum. We also wanted to make it possible for developers to use their favorite editor to write TypeScript code, in addition to the TypeScript online playground and the Visual Studio plugin.
Below you will find sample syntax files for Sublime Text, Vi and Emacs that will add syntax highlighting to the files with a .ts extension. We want to hear from you on where you think we should post these files for you to be able to optimize them and help us make your TypeScript programming an even greater experience, so please comment on this post or send us a message.
Olivier Bloch
Senior Technical Evangelist
Microsoft Open Technologies, Inc.


For Sublime you might want to make package available for wbond.net/…/package_control
SublimeText: It would be wonderful if you guys could host a) on GitHub for community contributions; and b) in Sublime's Package Control.
Any plan to release a full-featured Sublime Package?
I'm sure Sublime Text users would love it if you set up the TypeScript language file to be in the default Package Control channel.
The simplest way is if it is hosted on GitHub (wbond.net/…/package_developers), but it is also possible to use Package Control to generate a .sublime-package file and host it plus a packages.json file (github.com/…/example-packages.json) on any public URL.
Feel free to shoot me an email or tweet (@wbond) if you have any questions.
First of all congratulations and thanks for doing this right. Npm package, git
repository, editor extensions, Apache License, this is a great announcement.
Emacs currently has a nice package ecosystem. Please submit stable releases of
typescript.el to marmalade[1] (). Creating a MELPA[2] recipe wouldn't hurt
either, especially for new packages with (hopefully) high development activity
such typescript.el. Since you are hosting your code on git creating a recipe is
trivial after setting up a git repository:
(typescript-mode
:url "git01.codeplex.com/typescript-mode"
:fetcher git
:files ("typescript.el"))
Even though you already have your own IDE please don't dump this on the
community and stop improving these editor plugins :). From a quick glance it
looks like TypeScript allows much better code analysis in Emacs and other
editors compared to JavaScript.
1: http://marmalade-repo.org/
2: http://melpa.milkbox.net/
Is there any plan for an Eclipse plugin anytime in the future? (Will help this go head to head with Dart)
Very interesting and it's great how open you guys are. Given the traction sublime has it'd be interesting to see if people take advantage of TS to add features like refactoring (something like github.com/…/SublimeRope).
It seems that in Sublime, method names do not get highlighted if there is an argument specified.
Also, I think this is really cool. I didn't expect it to be supported in anything except Visual Studio. So, I can dig it! So far, seems like a great alternative to coffeescript.
awesome work! thanks for the Sublime plugin, but it looks like it will also work for TextMate (which is a big plus as well).
And WebMatrix? =/
Github, please!!!
What about NetBeans support?
+1 for Sublime Package Control. Thanks for the Sublime Text extension. It would be super awesome if MS would release some sort of static analysis libraries on an open source basis (in JS/TS, preferably!), and from there the community could go about integrating them with common editors.
in addition to Eran's question: Are there plans to support the Eclipse-Maven toolchain? In order to be able to integrate it into a continuous integration environment typically used in our organization for enterprise scale application development, both an Eclipse plugin as well as Maven build plugins are required.
Cool, thanks for supporting Sublime!
Would be cool, as others mentioned, to include it into Sublime package manager (wbond)!
Thanks!
Any plans for netbeans?
I am not sure why not this for webmatrix.
do you ownself don't believe that webmatix and expression studio or marketing guys is just died for webmatrix and expression studio/
installer should install some help file or just link to a help website.
Looking forward to see a Netbeans plugin.
For Vim you could upload to http://www.vim.org/scripts, or make it available as a git repository somewhere (as an example I have created one at github.com/…/typescript-vim and added simple filetype detection).
With either of those options then the syntax can easily be added using Vim package managers like Pathogen or Vundle.
A zip file? srsly?
Thanks all for your comments and suggestions. We are looking into the next steps and will definitively let you know rapidly what we will do based on your input. Stay tuned and keep the good feedback and suggestions coming, this helps a lot.
– Olivier
Could you provide VS2010 support?
+1 for Eclipse Plugin
+1 for Visual Studio support, but Notepad++ would also be cool. 🙂
Great to see that there is Sublime Text 2 Support, I love this editor, as the other commenters said, please publish it through Package Control (wbond).
Anyway, I'll give it a try these days.
It would be nice if you supported people stuck on Windows XP with VS2010 or VS2k8. As with the non-Microsoft editors, just syntax highlighting would do…
Jetbrains Webstorm
Could you provide VS2008 support?
Are the copyright headers from typescript.el correct?
"Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. […]
This file is part of GNU Emacs."
plus.google.com/…/3P9dFY9jUxu
Anyone have a Sublime build system configuration? I have node, and the TypeScript node package installed on Windows 7.
This does not work:
{
"cmd": ["node", "tsc", "$file"],
"file_regex": "(.*\.ts?)\s\(([0-9]+)\,([0-9]+)\)\:\s(…*?)$",
"path":"C:\Windows\system32\cmd.exe",
"shell": false
}
Yes please add a Package Control version for Sublime Text.
Please build an Eclipse plug-in and a TextMate package.
Thanks!
Where is the emacs file? It's not in the zip.
So the emacs zip hasn't been updated in weeks; are we going to get an emacs version again?
'The file is temporarely unvailable. We will return soon with an updated version.'
The spelling of temporarily, and unavailable is incorrect as well….
Hi all
The Emacs support is still in the works and we hope to be able to bring it back rapidly. Sorry for the delay and thanks for your interest and feedback!
We are also looking into the best way to deliver these extensions for you to be able to get the most out of them. Stay tuned.
– Olivier
Thanks for the quick reply, hope to get the emacs version soon!
The README-vim-typescript.txt should say to append these to the $HOME_vimrc file
syntax on
filetype on
au BufNewFile,BufRead *.ts set filetype=typescript
Or modifying the $VIMRUNTIMEfiletype.vim to recognize the *.ts extension.
@Eljay
Thanks for the tip. I will look into this.
– Olivier
what do I do with the sublime file to get it to work?
It's really unfortunate that the decision was made not to support VS2010. Now instead of being able to learn and begin using TypeScript, a large number of developers are cut off from it until their organizations finally make the decision to allow their people to migrate to VS2012. Really unfortunate!
Here's another option, use C# that you already know, that works in Visual Studio 2005, 2008, 2010 and 2012, and convert it JavaScript during build, now that's interoperability for you! 😉
http://sharpkit.net/Live.aspx
Sublime text plugin doesn't work as is on Linux.
You need to rename the file in the zip to typeScript.tmLanguage (Linux is case sensitive!)
can anyone tell if and when we'll have the netbeans plugin?
@Ville Vainio
Thanks for the heads up. I have fixed the Sublime Text plug in changing the extension of the file to tmLanguage with a capital "L".
– Olivier
Olivier,
Thanks for providing these plugins. It helps TypeScript to fit in my workflow pretty smoothly.
This article was very useful for me on how to set up a new build system within Sublime Text 2. Pasting here in case others can use it: http://www.andrewrowland.com/…/typescript-sublime-text-integration
I've gathered the syntax highlighting for sublime text 2 here with a build system (based on examples from others) feel free to comment and improve it: github.com/…/sublime-text-2-typescript
@Eran Medan
Thanks a lot, this is great!
– Olivier
I added the [TypeScript syntax highlighting][1] to Packagist[2] for SublimeText 2. Now it's as easy as doing: "Cmd+Shift+P, Install Package, TypeScript"
[1]: github.com/…/sublime-typescript
[2]: github.com/…/810
As for building, I'd recommend using grunt.js instead, but it looks like someone has already started work for the build system before me.
@Eric
Great job! I'll make sure to follow up with you offline to see how we can work together on maintaining this project.
-Olivier
Installing with Sublime Package Control
+1 for WebStorm
+1 for Eclipse plugin and Maven build plugin
Great job!
How can we use Database in typescript?
@Nitin
TypeScript is JavaScript, therefore you can access Databases the same way you do with JavaScript code.
There is a sample that shows typed usage of MongoDB for server-side database access in the samples here: typescript.codeplex.com/…/ac38ce9e29b3
– Olivier
The Sublime Text syntax definition does not recognize method names unless the opening brace is on the same line as the method name. If the opening brace is on the following line, the method name is not highlighted properly; and worse, the "Go To Symbol" command will not show those method names either!
Meanwhile, the TypeScript compiler handles various opening brace positions just fine. Please fix.
@bunnyhero
We are working on updating all these extensions. You should hear from us soon on our new blog: msopentech.com/blog
– Olivier
Create for Notepad++ please