如何解决Angular 无重载匹配此调用链接管道
我的视图有效并正确设置日期格式。但我总是收到此错误消息:
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,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,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'}}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
我使用的是严格的打字稿模式。
您可以在此处找到源代码:https://www.codepile.net/pile/1BoRp3xP
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。