Closed
Description
Describe the bug
I have discovered that it's possible to return an array in catchError.
Expected behavior
Returning arrays shouldn't be possible.
catchError(() => [])
Reproduction code
import { tap, switchMap, throwError, catchError, of } from "rxjs";
of(1)
.pipe(
tap(console.log),
switchMap(() => throwError(() => new Error())),
catchError(() => []),
)
.subscribe(console.log);
Reproduction URL
Version
7.8.1
Environment
osx: 13.6.3 (22G436)
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels