Skip to content

Instantly share code, notes, and snippets.

@shigemk2 shigemk2/accessor.ts
Created Feb 23, 2015

What would you like to do?
class A {
private message: string;
set sample(str: string) { this.message = str; }
get sample(): string { return this.message; }
var b = new A();
b.sample = "two accessor";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.