UNPKG

react-native

Version:

A framework for building native apps using React

51 lines (45 loc) 1.13 kB
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow strict */ export type MeasureOnSuccessCallback = ( x: number, y: number, width: number, height: number, pageX: number, pageY: number, ) => void; export type MeasureInWindowOnSuccessCallback = ( x: number, y: number, width: number, height: number, ) => void; export type MeasureLayoutOnSuccessCallback = ( left: number, top: number, width: number, height: number, ) => void; /** * Current usages should migrate to this definition */ export interface LegacyHostInstanceMethods { blur(): void; focus(): void; measure(callback: MeasureOnSuccessCallback): void; measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; measureLayout( relativeToNativeNode: number | HostInstance, onSuccess: MeasureLayoutOnSuccessCallback, onFail?: () => void, ): void; setNativeProps(nativeProps: {...}): void; } export type HostInstance = LegacyHostInstanceMethods;