Skip to content
Open
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 @@ -45,7 +45,11 @@ export function renderElement({
export const dispatchCommand = ReactFabric.dispatchCommand;
export const findHostInstance_DEPRECATED =
ReactFabric.findHostInstance_DEPRECATED;
export const findNodeHandle = ReactFabric.findNodeHandle;
export const findNodeHandle: {
findNodeHandle<TElementType extends React.ElementType>(
componentOrHandle: ?(React.ElementRef<TElementType> | number),
): ?number,
}['findNodeHandle'] = ReactFabric.findNodeHandle;
export const sendAccessibilityEvent = ReactFabric.sendAccessibilityEvent;
export const isChildPublicInstance = ReactFabric.isChildPublicInstance;
export const getNodeFromInternalInstanceHandle =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noformat
* @nolint
* @flow strict
* @generated SignedSource<<e98f2799fc8b1c559fda763a0c36b39f>>
* @generated SignedSource<<f37cc5cc99a5347fb443d0f0dc736152>>
*/

import type {
Expand Down Expand Up @@ -163,6 +163,7 @@ export type ReactFabricType = {
options: ?RenderRootOptions,
): ?React.ElementRef<React.ElementType>,
unmountComponentAtNode(containerTag: number): void,
readonly flushSync: (<R>(fn: () => R) => R) & ((fn: void) => void),
getNodeFromInternalInstanceHandle(
internalInstanceHandle: InternalInstanceHandle,
): ?Node,
Expand Down
70 changes: 8 additions & 62 deletions packages/react-native/ReactNativeApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d85687fceb0705d7e07b3a0b4529a17f>>
* @generated SignedSource<<fee829cb43f2a2ab85398910c6659b23>>
*
* This file was generated by scripts/js-api/build-types/index.js.
*/
Expand Down Expand Up @@ -59,7 +59,6 @@ declare const $$index: {
get VirtualizedSectionList(): AnyVirtualizedSectionList
}
declare const $$NativeDeviceInfo: typeof NativeModule_default
declare const $$ReactFabric: typeof ReactFabric_default
declare const $$resolveAssetSource: typeof resolveAssetSource_default
declare const $$ScrollViewContext: typeof ScrollViewContext_default
declare const absoluteFill: AbsoluteFillStyle
Expand Down Expand Up @@ -228,7 +227,11 @@ declare const eventImpl: <T>(
argMapping: ReadonlyArray<Mapping | null | undefined>,
config: EventConfig<T>,
) => (...args: Array<any>) => void
declare const findNodeHandle: typeof $$ReactFabric.findNodeHandle
declare const findNodeHandle: {
findNodeHandle<TElementType extends React.ElementType>(
componentOrHandle: (number | React.ComponentRef<TElementType>) | undefined,
): number | undefined
}["findNodeHandle"]
declare const flatten: typeof $$flattenStyle
declare const forkEvent: typeof $$AnimatedImplementation.forkEvent
declare const hairlineWidth: number
Expand Down Expand Up @@ -343,7 +346,6 @@ declare const RCTNetworking_default: {
withCredentials: boolean,
): void
}
declare let ReactFabric_default: ReactFabricType
declare const registerCallableModule: typeof registerCallableModule_default
declare const registerCallableModule_default: RegisterCallableModule
declare const requireNativeComponent: typeof requireNativeComponent_default
Expand Down Expand Up @@ -921,7 +923,6 @@ declare type $$AnimatedImplementation = typeof $$AnimatedImplementation
declare type $$flattenStyle = typeof $$flattenStyle
declare type $$index = typeof $$index
declare type $$NativeDeviceInfo = typeof $$NativeDeviceInfo
declare type $$ReactFabric = typeof $$ReactFabric
declare type $$resolveAssetSource = typeof $$resolveAssetSource
declare type $$ScrollViewContext = typeof $$ScrollViewContext
declare class AbortSignal extends EventTarget_default {
Expand Down Expand Up @@ -3351,9 +3352,6 @@ declare interface NativeUIEvent {
readonly detail: number
}
declare type Networking = typeof Networking
declare type Node = symbol & {
__Node__: string
}
declare class NodeList_default<T> implements Iterable<T>, ArrayLike_2<T> {
[index: number]: T
readonly length: number
Expand Down Expand Up @@ -3959,36 +3957,6 @@ declare type RCTNetworkingEventDefinitions = {
]
readonly didSendNetworkData: [[number, number, number]]
}
declare type ReactFabricType = {
dispatchCommand(
handle: HostInstance,
command: string,
args: Array<unknown>,
): void
findHostInstance_DEPRECATED<TElementType extends React.ElementType>(
componentOrHandle: (number | React.ComponentRef<TElementType>) | undefined,
): HostInstance | undefined
findNodeHandle<TElementType extends React.ElementType>(
componentOrHandle: (number | React.ComponentRef<TElementType>) | undefined,
): number | undefined
getNodeFromInternalInstanceHandle(
internalInstanceHandle: InternalInstanceHandle,
): Node | undefined
getPublicInstanceFromInternalInstanceHandle(
internalInstanceHandle: InternalInstanceHandle,
): HostInstance | null | PublicTextInstance
getPublicInstanceFromRootTag(rootTag: number): null | PublicRootInstance
isChildPublicInstance(parent: HostInstance, child: HostInstance): boolean
render(
element: React.JSX.Element,
containerTag: number,
callback: (() => void) | undefined,
concurrentRoot: boolean | undefined,
options: RenderRootOptions | undefined,
): React.ComponentRef<React.ElementType> | undefined
sendAccessibilityEvent(handle: HostInstance, eventType: string): void
unmountComponentAtNode(containerTag: number): void
}
declare class ReactNativeDocument_default extends ReadOnlyNode_default {
get childElementCount(): number
get children(): HTMLCollection_default<ReadOnlyElement_default>
Expand Down Expand Up @@ -4175,28 +4143,6 @@ declare type Registry = {
runnables: Runnables
sections: ReadonlyArray<string>
}
declare type RenderRootOptions = {
onCaughtError?: (
error: unknown,
errorInfo: {
readonly componentStack?: string
readonly errorBoundary?: React.Component<any, any>
},
) => void
onDefaultTransitionIndicator?: () => (() => void) | void
onRecoverableError?: (
error: unknown,
errorInfo: {
readonly componentStack?: string
},
) => void
onUncaughtError?: (
error: unknown,
errorInfo: {
readonly componentStack?: string
},
) => void
}
declare type RequestBody =
| ArrayBuffer
| ArrayBufferView
Expand Down Expand Up @@ -5908,7 +5854,7 @@ export {
AlertOptions, // 8a116d2a
AlertType, // 5ab91217
AndroidKeyboardEvent, // e03becc8
Animated, // 633f77ed
Animated, // 5569381c
AnimatedFlatList, // f32979ff
AnimatedImage, // 08521177
AnimatedScrollView, // 1b410f55
Expand Down Expand Up @@ -6204,7 +6150,7 @@ export {
WrapperComponentProvider, // 6ce47ba4
codegenNativeCommands, // 322f3f4e
codegenNativeComponent, // 162426af
findNodeHandle, // 93f80214
findNodeHandle, // fcaaf831
processColor, // 6e877698
registerCallableModule, // 55bda579
requireNativeComponent, // 27104937
Expand Down
Loading