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
package greenplanettestclient; | |
import greenplanetclient.*; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import javax.xml.bind.JAXBException; | |
/** | |
* @author michel | |
*/ |
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
@timestampable | |
class Dog { | |
public name: string = 'Paul'; | |
} | |
function timestampable(func) { | |
return <any>(function() { | |
var genericConstructor = () => {}; | |
genericConstructor.prototype = func.prototype; | |
var instance = new genericConstructor(); |
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 Dog { | |
@deprecated('Dogs don\'t roar, they talk.') | |
roar() { | |
console.log('RRRRR'); | |
} | |
@deprecated() | |
smile() { | |
console.log('smile'); | |
} |
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 Dog { | |
@trace | |
compute(a: number, b: number): any { | |
// my dog is a bit slow and weird to compute.. | |
for (var i = 0; i < 1000000000; i++) { | |
var result = a + b; | |
} | |
// .. not even accurate | |
return 'wouf'; |