从组件导入“导出声明类型”

时间:2020-08-26 23:20:14

标签: typescript react-native-paper

我正在使用react Native Paper并扩展它的TextInput。我希望从the component导入组件的类型定义。

它的定义如下:

export declare type TextInputProps = React.ComponentPropsWithRef<typeof NativeTextInput> & {
   ... < The stuff I need
}

在我自己的功能组件中,如何获取?

我尝试了很多事情,例如:

const {TextInputProps} = TextInput;

const whatINeed = TextInput.TextInputProps

有什么主意吗?

0 个答案:

没有答案