For example, I want to assign the variable with the specific react native element type to restrict the react native element stored in the variable.
b = React.createElement(Text,{},'hii'); a:Text = this.b;
I tried to use the library @types/react-native to do it but it shows error as follow:
Type 'ComponentElement<TextProps, Text>' is missing the followingproperties from type 'Text': measure, measureInWindow, measureLayout,setNativeProps, and 8 more.
How can I solve it?