polyhack / nodejsau

11 stars 32 forks source link

Post: Getting started with TypeScript #24

Open basarat opened 11 years ago

basarat commented 11 years ago

(A summary from a presentation given at MelbNodeJS on the 28th of August 2013)

Takeaways from the TypeScript demo

You can get TypeScript from here : http://www.typescriptlang.org/#Download

On all systems that have nodejs you can simply do:

npm install -g tsc

Its open-source and uses the apache license.

TypeScript definitions for existing libraries

You can use your existing javascript libraries from typescript with a line as simple as:

declare var $:any; 

But for high quality static checking + intellisense checkout : https://github.com/borisyankov/DefinitelyTyped

For IDE support:

Webstorm comes with integrated support http://www.jetbrains.com/webstorm/. You can get a free version of WebStorm (which supports the 0.9.x version of TypeScript) here: http://confluence.jetbrains.com/display/WI/WebStorm+7+EAP

GruntJS is fully supported : https://npmjs.org/package/grunt-ts

Play with it in your Browser:

Checkout : http://www.typescriptlang.org/Playground/

rvagg commented 11 years ago

just changed your headings to 4th level, our css obviously needs a bit of work!

live @ http://nodejs.org.au/#posts

balupton commented 11 years ago

Any ideas how you compile typescript programmatically? Something like require('typescript').compile('some typescript code', {anOption: true});

I'd love to add a plugin for it to docpad

sidorares commented 11 years ago

@balupton https://github.com/bodil/typeify

balupton commented 11 years ago

@sidorares sweet thanks, I'll take a look at that, I've also posted here https://typescript.codeplex.com/workitem/117 about it

sidorares commented 11 years ago

I looked at the source - they actually have a copy of TS compiler in the package (2.5 mb of javascript). I'm sure there is a simpler way.