Created
August 24, 2020 22:07
-
-
Save kanian/3ea22dac8297d26c83038c02dd71f21b 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
setProps<T extends BaseObject>(values: PartialOfProperties<T>): void { | |
for (let prop in values) { | |
this[prop] = | |
values[prop] !== undefined ? values[prop] : this[prop]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment