mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
Fix Flow type for React Native (#17992)
This commit is contained in:
@@ -41,16 +41,12 @@ export default function(
|
||||
*
|
||||
* @abstract
|
||||
*/
|
||||
class ReactNativeComponent<Props, State = void> extends React.Component<
|
||||
Props,
|
||||
State,
|
||||
> {
|
||||
class ReactNativeComponent<Props> extends React.Component<Props> {
|
||||
/**
|
||||
* Due to bugs in Flow's handling of React.createClass, some fields already
|
||||
* declared in the base class need to be redeclared below.
|
||||
*/
|
||||
props: Props;
|
||||
state: State;
|
||||
|
||||
/**
|
||||
* Removes focus. This is the opposite of `focus()`.
|
||||
|
||||
+2
-2
@@ -137,7 +137,7 @@ type SecretInternalsFabricType = {
|
||||
* Provide minimal Flow typing for the high-level RN API and call it a day.
|
||||
*/
|
||||
export type ReactNativeType = {
|
||||
NativeComponent: _InternalReactNativeComponentClass<{...}>,
|
||||
NativeComponent: typeof ReactNativeComponent,
|
||||
findHostInstance_DEPRECATED(
|
||||
componentOrHandle: any,
|
||||
): ?ElementRef<HostComponent<mixed>>,
|
||||
@@ -157,7 +157,7 @@ export type ReactNativeType = {
|
||||
};
|
||||
|
||||
export type ReactFabricType = {
|
||||
NativeComponent: _InternalReactNativeComponentClass<{...}>,
|
||||
NativeComponent: typeof ReactNativeComponent,
|
||||
findHostInstance_DEPRECATED(componentOrHandle: any): ?HostComponent<mixed>,
|
||||
findNodeHandle(componentOrHandle: any): ?number,
|
||||
dispatchCommand(handle: any, command: string, args: Array<any>): void,
|
||||
|
||||
Reference in New Issue
Block a user