TypeScript - Getter and Setter Properties
get fileNameWithoutExt(): string {
return this.fileName.substring(0, this.fileName.lastIndexOf('.'));
}
class foo {
private _bar:boolean = false;
get bar():boolean {
return this._bar;
}
set bar(theBar:boolean) {
this._bar = theBar;
}
}
Comments