this is part of my code:
const myObj: object = {}
const propname = \'propname\'
myObj[propname] = \'string\'
<
You have to define what kind of index type the object has. In your case it is a string
based index.
const myObj: {[index: string]:any} = {}
Why just simple replace 'object' with 'any':
const myObj: any = {}
const propname = 'propname'
myObj[propname] = 'string'
Another short alternative.