Question: I'm using Chrome 70 and Chrome does add methods `.flatMap`, `.flatten`, `.flat`. So my code does run as expected. Unfortunately, TypeScript doesn't like it.

```
// data.flatMap lint error
export const transformData = (data: any[]) => data.flatMap(abc => [
   parentObj(abc),
   ...generateTasks(abc)
]);

```

The warning I got is `TS2339: Property 'flatMap' does not exist on type 'any[]'.`

I'm using Angular 6, which uses Typescript ~2.9.2, and I already include `import 'core-js/es7/array';` in `polyfills.ts`.

My guess is that there is no typing for these methods, and I did try to `npm run -dev @types/array.prototype.flatmap` but still not solve.

Answer: 
As of angular 11 and thx to [typescript 3.9](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html) this is now the new config.

```json
"compilerOptions": {
    "target": "es2018",
    "module": "es2020",
    "lib": ["es2020", "dom"],
}

```

### Why `es2020` instead of `esnext`?

> 
> In TypeScript 3.9, the behavior of the TypeScript compiler controlled by module is the same with both "esnext" and "es2020" values. This behavior can change in the future, because the "esnext" option could evolve in a backwards incompatible ways, resulting in build-time or run-time errors during a TypeScript update. As a result, code can become unstable. Using the "es2020" option mitigates this risk.
> 
> 
> 

[for further read](https://angular.io/guide/migration-update-module-and-target-compiler-options)
You can also add `esnext` to your --lib instead of 'es2019'

```
"compilerOptions": {
    "target": "es2015",
    "lib": ["dom", "esnext"]
}

```

It worked for me.