Create Class Properties using Constructor Assignment

InstructorKamran Ahmed

Share this video with your friends

Send Tweet

Instead of manually creating the class properties and assigning them values in the constructor, TypeScript has a better way to let you create and assign values to class properties. All you have to do is prefix the constructor arguments with private or public, TypeScript will automatically create the class properties for the given argument name with the proper access specifier.