Browse Source

5.6: Class members.

Frederic G. MARAND 5 years ago
parent
commit
c5613fc9ef
1 changed files with 16 additions and 0 deletions
  1. 16 0
      app/developer.ts

+ 16 - 0
app/developer.ts

@@ -0,0 +1,16 @@
+class Developer {
+  department: string;
+  private _title: string;
+
+  get title(): string {
+    return this._title;
+  }
+
+  set title(title: string) {
+    this._title = title.toUpperCase();
+  }
+
+  documentRequirements(requirements: string): void {
+    console.log(requirements);
+  }
+}