Explorar el Código

5.6: Class members.

Frederic G. MARAND hace 5 años
padre
commit
c5613fc9ef
Se han modificado 1 ficheros con 16 adiciones y 0 borrados
  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);
+  }
+}