【发布时间】:2019-11-25 16:12:26
【问题描述】:
为什么下面的 react-native 代码会出现 typescript 错误?
type ContainerProps = BaseProps & {
children: React.ChildrenArray<React.ReactElement<any>>;
withGutter?: boolean;
};
任何 命名空间 'React' 没有导出的成员 'ChildrenArray'.ts(2694)
正确的表达方式是什么?这最初是基于流的 js 代码被转换为 typescript...
【问题讨论】:
-
你试过了吗:
React.ReactNode?
标签: typescript react-native flowtype