Angular 20 claims async pipe result to be unknown despite it being properly typed

Discussão em 'Angular' iniciado por Steffen, Julho 22, 2025.

  1. Steffen

    Steffen Guest

    I recently tried upgrading my project from Angular 19 to Angular 20. Now Angular throws the following error for all my async pipes:

    Type 'unknown' must have a '[Symbol.iterator]()' method that returns an iterator


    or

    TS2339: Property 'id' does not exist on type 'unknown'


    However, I don't get why it claims the type as unknown, as all my Observables are properly typed. Here's an example:

    @if (invitation$ | async; as invitation) {


    And invitation being declared as

    invitation$: Observable<InvitationDto>;


    inside the controller. Trying to access it, I get the error:

    [value]="getUrl(invitation.id)"

    Continue reading...

Compartilhe esta Página