Created
November 17, 2017 23:19
-
-
Save sentientmonkey/44ed58b613dec7fc0de4e2545ab20782 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class Person { | |
public name: string = "default" | |
public address: string = "default" | |
public age: number = 0; | |
public constructor(init:Partial<Person> = {} as Partial<Person>) { | |
this.name = init.name || this.name; | |
this.address = init.address || this.address; | |
this.age = init.age || this.age; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment