Skip to content

Type RxJS Next error values as unknown instead of any #7649

Open

Description

@benlesh

Follow-up to Discussion #7625.

RxJS Next public APIs currently expose several error values as any. That lets an error flow escape type checking even though JavaScript can throw any value and TypeScript treats catch bindings as unknown under strict settings.

Update the intentional RxJS Next error surface to use unknown consistently: observer/subscriber error callbacks, ColdObservable error delivery, subject error pathways, catchError, tap positional and observer-object forms, retry, notification error values, and the relevant platform catch/inspection callback types. Preserve the actual value at runtime.

This is a public type-only breaking change. Add focused strict type regressions that require narrowing before property access, and document the intentional compatibility break.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions