Created
February 23, 2015 12:57
-
-
Save shigemk2/98806589e8594d1d1928 to your computer and use it in GitHub Desktop.
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 A { | |
private message: string; | |
set sample(str: string) { this.message = str; } | |
get sample(): string { return this.message; } | |
} | |
var b = new A(); | |
console.log(b.sample); | |
b.sample = "two accessor"; | |
console.log(b.sample); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment