Angular no overload matches this call (chaining pipes)

Viewed 181

My view works and formats the dates correctly. But I always get this error message:

Error: src/app/shared/components/table/table.component.html:86:31 - error TS2769: No overload matches this call.
      Overload 1 of 3, '(value: string | number | Date, format?: string | undefined, timezone?: string | undefined, locale?: string | undefined): string | null', gave the following error.
        Argument of type 'unknown' is not assignable to parameter of type 'string | number | Date'.
          Type 'unknown' is not assignable to type 'Date'.
      Overload 2 of 3, '(value: null | undefined, format?: string | undefined, timezone?: string | undefined, locale?: string | undefined): null', gave the following error.
        Argument of type 'unknown' is not assignable to parameter of type 'null | undefined'.
          Type 'unknown' is not assignable to type 'null'.
      Overload 3 of 3, '(value: string | number | Date | null | undefined, format?: string | undefined, timezone?: string | undefined, locale?: string | undefined): string | null', gave the following error.
        Argument of type 'unknown' is not assignable to parameter of type 'string | number | Date | null | undefined'.
          Type 'unknown' is not assignable to type 'Date'.
    
    86                             {{element | dataPropertyGetter: tableColumn.headerId | date:'dd.MM.yyyy - HH:mm:ss'}}
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I am using the strict typescript mode.

You can find the source code here: https://www.codepile.net/pile/1BoRp3xP

0 Answers
Related