TypeScript Constructor Assignment: public and private Keywords

TypeScript includes a concise way to create and assign a class instance property from a constructor parameter. Rather than: class TestClass { private name: string; constructor(name: string) { this.name = name; } } One can use the private keyword instead: class TestClass { constructor(private name: …