Property 'fromEntries' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2019' or later.
component:
obj = Object.fromEntries(this.arr.map((ar) => [ar.a, ar.b]));
tsconfig.json:
{
"compilerOptions": {
"module": "esnext",
"target": "es2019",
"lib": [
"es2020",
"dom"
]
}
}
component:
tsconfig.json:
{ "compilerOptions": { "module": "esnext", "target": "es2019", "lib": [ "es2020", "dom" ] } }