Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const getMethod: (<MethodName extends keyof ReactFabricType>(
return function (arg1, arg2, arg3, arg4, arg5, arg6) {
if (cachedImpl == null) {
// $FlowExpectedError[prop-missing]
// $FlowExpectedError[invalid-computed-prop]
cachedImpl = getRenderer()[methodName];
}

Expand Down
7 changes: 3 additions & 4 deletions packages/react-native/Libraries/Renderer/shims/ReactNative.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
* @noformat
* @nolint
* @flow
* @generated SignedSource<<7a063365bcf9d96b1cd8714d309e5b92>>
* @generated SignedSource<<5908e4e900f26a939c59a16d2c252af3>>
*
* This file is no longer sync'd from the facebook/react repository.
* The version compatibility check is removed. Use at your own risk.
*/
'use strict';

import type {ReactNativeType} from './ReactNativeTypes';

let ReactNative: ReactNativeType;
// The underlying type no longer exists
let ReactNative: $FlowFixMe;

if (__DEV__) {
ReactNative = require('../implementations/ReactNativeRenderer-dev');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noformat
* @nolint
* @flow strict
* @generated SignedSource<<c0e57723772ea5f1aa8c3c897ac3c216>>
* @generated SignedSource<<4ab83fd2606d6a4d374ef914f231d9c1>>
*/

import type {
Expand Down Expand Up @@ -138,36 +138,6 @@ export type RenderRootOptions = {
onDefaultTransitionIndicator?: () => void | (() => void),
};

/**
* Flat ReactNative renderer bundles are too big for Flow to parse efficiently.
* Provide minimal Flow typing for the high-level RN API and call it a day.
*/
export type ReactNativeType = {
findHostInstance_DEPRECATED<TElementType: React.ElementType>(
componentOrHandle: ?(React.ElementRef<TElementType> | number),
): ?PublicInstance,
findNodeHandle<TElementType: React.ElementType>(
componentOrHandle: ?(React.ElementRef<TElementType> | number),
): ?number,
isChildPublicInstance(parent: PublicInstance, child: PublicInstance): boolean,
dispatchCommand(
handle: PublicInstance,
command: string,
args: Array<mixed>,
): void,
sendAccessibilityEvent(handle: PublicInstance, eventType: string): void,
render(
element: React.MixedElement,
containerTag: number,
callback: ?() => void,
options: ?RenderRootOptions,
): ?React.ElementRef<React.ElementType>,
unmountComponentAtNode(containerTag: number): void,
unmountComponentAtNodeAndRemoveContainer(containerTag: number): void,
+unstable_batchedUpdates: <T>(fn: (T) => void, bookkeeping: T) => void,
...
};

export opaque type Node = mixed;
export opaque type InternalInstanceHandle = mixed;

Expand Down
Loading