Skip to content

Instantly share code, notes, and snippets.

@fnobi
Created June 5, 2013 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fnobi/5715339 to your computer and use it in GitHub Desktop.
Save fnobi/5715339 to your computer and use it in GitHub Desktop.
Coffeeか、Typeか。 〜比較しながらの入門編〜 ref: http://qiita.com/items/8bd24c0994a2015ffbeb
npm -g install typescript
npm -g install coffee-script
class Human {
name: string;
constructor (name: string) {
this.name = name;
}
hello () {
console.log('My name is %s.', this.name);
}
}
class Human
constructor: (@name) ->
hello: ->
console.log("My name is #{@name}.")
tsc Human.ts index.ts --out index.js
coffee -j index.js -c Human.coffee index.coffee
/// <reference path="Human.ts" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment