TS2322 "is not assignable to type" typescrip
发布时间:2020-12-15 06:43:55 所属栏目:百科 来源:网络整理
导读:问题描述 TS2322 "is not assignable to type" react-router 4.0 typescript 2.3.x TS2322: Type '{ path: string; key: string; component: ComponentClassRouteComponentPropsany | StatelessCompo...' is not assignable to type 'IntrinsicAttributes In
问题描述 TS2322 "is not assignable to type"
TS2322: Type '{ path: string; key: string; component: ComponentClass<RouteComponentProps<any>> | StatelessCompo...' is not assignable to type 'In trinsicAttributes & IntrinsicClassAttributes<Route<T>> & Readonly<{ children?: ReactNode; }> & ...'. Type '{ path: string; key: string; component: ComponentClass<RouteComponentProps<any>> | StatelessCompo...' is not assignable to type 'Readonly<T>' 这种情况应该typescript版本过低造成的 尝试使用typescript@2.5.3 问题解决 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |