BACK
ReferenceflatMap
Reference · 67

flatMap

flatMap

Deprecated
rxjs.dev

Alias for mergeMap.

Signature

flatMap(project: (value: T, index: number) => ObservableInput): OperatorFunction

What it does

Projects each value into an inner Observable and merges the results in parallel. It's the old name for mergeMap.

When to use

Only for supporting legacy code. In new code use mergeMap to avoid the deprecated API.

Deprecated API

Marked deprecated in RxJS 7. In new code, use mergeMap.

See also

mergeMap, concatMap, switchMap

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...