assign properties to object typescript code example
Example 1: typescript dynamic key value object
interface LooseObject {
[key: string]: any
}
var obj: LooseObject = {};
Example 2: ts create nex field
var obj:any = {}
obj.prop = 5;
interface LooseObject {
[key: string]: any
}
var obj: LooseObject = {};
var obj:any = {}
obj.prop = 5;