Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Countries = 'england' | 'scotland' | 'wales';
- type Urls = { [country in Countries]: string }
- const baseUrls: Urls = {
- 'england': 'foo',
- 'scotland': 'foo',
- 'wales': 'foo',
- };
- const env = 'england';
- const baseUrl: string = baseUrls[env];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement