TypeScript错误TS2345是否有eslint规则

TypeScript错误TS2345是否有eslint规则,typescript,eslint,Typescript,Eslint,是否有eslint规则来检查typescript错误TS2345?例如,当接口没有所有必需的值时 Argument of type '{ toValue: number; fieldName: number; }' is not assignable to parameter of type 'SomeConfig'. Property 'otherProp' is missing in type '{ toValue: number; fieldName: number; }' but r

是否有eslint规则来检查typescript错误TS2345?例如,当接口没有所有必需的值时

Argument of type '{ toValue: number; fieldName: number; }' is not assignable to parameter of type 'SomeConfig'.
  Property 'otherProp' is missing in type '{ toValue: number; fieldName: number; }' but required in type 'SomeConfig'.ts(2345)

因此,当使用Typescript运行react native web时,我在尝试使用动画API时遇到了这个错误。 如果这是您的情况,那么我可以自信地告诉您,解决方法是将本机驱动程序设置为false。
useNativeDriver:false

没有检查此错误的eslint规则,要触发此错误,需要生成TypeScript项目。添加
“build”:“tsc-p.”到包的“scripts”部分。json将允许您运行Thread build以显示此错误。

如果编译器本身首先通知您此问题,为什么需要eslint规则?Vscode正在通知错误,但编译器没有,而eslint没有,知道打开或关闭此检查的tslint规则将是实际编译器错误的另一种选择,因此您在VSCode之外的编译器设置似乎是错误的或不够严格。我建议你分析这一点,而不是试图为埃斯林找到一条绷带规则。@ChristianIvicevic是对的。为了正确创建这样一个规则,您必须在您的规则中承载typescript语言服务,这既不符合逻辑也不可行。您所引用的TS2345规则与任何linter无关。这是一个编译器错误代码。问题是如何看到这个错误,而不是这个特定的错误