I'm trying to use a Map using JSON parse this way:
Object.entries((JSON.parse(variables)))
and the compiler throws the error
Property 'entries' does not exist on type 'ObjectConstructor'
But the method works and I'm able to retrieve my map. I've looked for other questions and changed target and lib inside tsconfig files. Inside tsconfig.app.json
I have:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2017",
"target": "ESNext",
"baseUrl": "",
"types": [
"node"
],
"lib": [
"es2018",
"dom"
]
},
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
and in tsconfig.spec.json
:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"module": "commonjs",
"target": "ESNext",
"baseUrl": "",
"types": [
"jasmine",
"node"
],
"lib": [
"es2018",
"dom"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
I thought it was enough to set target and lib but it keeps not working. What else is it to change to remove compiler error?