SyntaxFix
Write A Post
Hire A Developer
Questions
The most simple and the correct way is to use Record type Record<string, string>
const myVar : Record<string, string> = { key1: 'val1', key2: 'val2', }