Why doesn’t the error “used before being assigned” apply to the value object in key:value pair in my following code ?
<code>let data:{[key: string]: {a:string,b:string}} = {}
// the correct way to add an item to data is
// data['1'] = {a:'test1',b:'test2'}
/* But I won't get any error for these, why ?! */
data['1'].a = 'test1'
data['1'].b = 'test2'
</code>
<code>let data:{[key: string]: {a:string,b:string}} = {}
// the correct way to add an item to data is
// data['1'] = {a:'test1',b:'test2'}
/* But I won't get any error for these, why ?! */
data['1'].a = 'test1'
data['1'].b = 'test2'
</code>
let data:{[key: string]: {a:string,b:string}} = {}
// the correct way to add an item to data is
// data['1'] = {a:'test1',b:'test2'}
/* But I won't get any error for these, why ?! */
data['1'].a = 'test1'
data['1'].b = 'test2'