Last active
August 29, 2015 14:09
-
-
Save nakamura-to/453cc1c3506ebded20eb to your computer and use it in GitHub Desktop.
react-toolsのjsxで変換
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Greeter { | |
greeting: string; | |
constructor(message: string) { | |
this.greeting = message; | |
} | |
greet() { | |
return "Hello, " + this.greeting; | |
} | |
} | |
var greeter = new Greeter("world"); | |
greeter.greet(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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