【发布时间】:2021-01-04 01:08:49
【问题描述】:
this.date = new Date(); TS LINTING 问题 相同的代码在我的同事 IDE 中没有问题 代码正在运行而没有任何错误,但它突然给了我这个错误。 需要帮助
【问题讨论】:
标签: angular typescript tslint
this.date = new Date(); TS LINTING 问题 相同的代码在我的同事 IDE 中没有问题 代码正在运行而没有任何错误,但它突然给了我这个错误。 需要帮助
【问题讨论】:
标签: angular typescript tslint
我在 Angular 8 中遇到过类似的问题。首先尝试重新编译并重新启动您的 ide,这可能是一个 linter 问题。接下来,尝试设置Date的类型,
this.date: Date = new Date();
【讨论】: