Created
May 16, 2023 16:40
-
-
Save wolak041/d813cfbe68be197d4b6a45030a077d4d 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
type Person = { | |
name: string; | |
[key: `phone${number}`]: string; | |
}; | |
const userA: Person = { | |
name: 'John', | |
phone1: '111-111-111', | |
phone2: '222-222-222', | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment