所以我用反应导航在我的反应本地项目,打字稿及终极版,但是当我的设置的contentComponent道具的drawerNavigator我在打字稿收到此错误。
键入'ConnectedComponentClass<SomeClass>' is not assignable to type 'ComponentType<DrawerItemsProps>'
Type 'SomeClass' is missing the following properties from type 'DrawerItemsProps': navigation, items, getLabel, renderIcon, and 2 more.
。
是否有相同的任何解决办法。
在相同的任何帮助,将不胜感激。
看来这类型DrawerItemsProps
有一个像navigation, items, getLabel, renderIcon
多的这些在你的SomeClass
接口缺少的属性。
这样就可以使所有这些特性,这是缺少可选使用“?”如下图所示
interface DrawerItemsProps {
// other properties
navigation?: yourType,
items?: yourType,
getLabel?: yourType,
renderIcon?: yourType
}