Skip to content

Instantly share code, notes, and snippets.

@nakamura-to
Last active August 29, 2015 14:09
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 nakamura-to/453cc1c3506ebded20eb to your computer and use it in GitHub Desktop.
Save nakamura-to/453cc1c3506ebded20eb to your computer and use it in GitHub Desktop.
react-toolsのjsxで変換
function Greeter(message) {"use strict";
this.greeting = message;
}
Greeter.prototype.greet=function() {"use strict";
return "Hello, " + this.greeting;
};
var greeter = new Greeter("world");
greeter.greet();
class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}
}
var greeter = new Greeter("world");
greeter.greet();
jsx --strip-types --harmony --watch src/ build/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment