Created
January 17, 2022 05:35
-
-
Save obaranovskyi/5ac3985f08047eee66880a0615179795 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
class User { | |
username: string; | |
age: number; | |
constructor(username: string,age: number) { | |
this.username = username; | |
this.age = age; | |
} | |
[propName: string]: string | number; | |
} | |
const user = new User('John', 23); | |
user['phone'] = '+3434234898'; | |
const something = user['something']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment