【发布时间】:2021-04-30 13:56:53
【问题描述】:
lib/admin/server/index.ts:87:5 - error TS2322: Type '(errors: ValidationError[]) => Error' is not assignable to type '(errors: ValidationError[]) => any'.
Types of parameters 'errors' and 'errors' are incompatible.
Type 'import("/home/xxxxxx/backend/node_modules/@nestjs/common/interfaces/external/validation-error.interface").ValidationError[]' is not assignable to type 'import("/home/xxxxx/backend/node_modules/class-validator/types/validation/ValidationError").ValidationError[]'.
87 exceptionFactory(errors: ValidationError[]): Error {
我将 nestjs 从 7.0 更新到 7.6,我遇到了这些错误,我对 TS 有点熟悉,但无法理解“错误”的含义,即错误不能分配给“任何” .
如果有人能提供 Nest.js 的 ChangeLog 的链接会很有帮助,因为我找不到它
-谢谢
【问题讨论】:
标签: node.js typescript nestjs