Typescript Map throwing error while using its functions (mapobject.keys() is not a function)
- 阅读更多 关于 Typescript Map throwing error while using its functions (mapobject.keys() is not a function)
问题 I am a new bee in typescript , In my angular4 project I am receiving a map object as a json. so I declared a class that is given bellow <importing... required classes here..> export class FormConfig { public id: number; public name: string; public fieldMap :Map<string,Array<Field>>; public fieldList : Array<Field> ; } I am receiving exactly same JSON from api. I consoled the object of FormConfig and I am getting the console without any error. My code got compiled without any warning and error