Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript class inheritance

class Employee extends Person {
    constructor(
        firstName: string,
        lastName: string,
        private jobTitle: string) {
        
        // call the constructor of the Person class:
        super(firstName, lastName);
    }
}
Code language: TypeScript (typescript)
Source by www.typescripttutorial.net #
 
PREVIOUS NEXT
Tagged: #typescript #class #inheritance
ADD COMMENT
Topic
Name
7+9 =