diff --git a/.github/actions/diff-js-api-breaking-changes/action.yml b/.github/actions/diff-js-api-breaking-changes/action.yml new file mode 100644 index 00000000000000..25ec197ab022b0 --- /dev/null +++ b/.github/actions/diff-js-api-breaking-changes/action.yml @@ -0,0 +1,23 @@ +name: diff-js-api-breaking-changes +description: Check for breaking changes in the public React Native JS API +runs: + using: composite + steps: + - name: Fetch snapshot from PR head + shell: bash + env: + SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes + run: | + mkdir $SCRATCH_DIR + git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }} + git show ${{ github.event.pull_request.head.sha }}:packages/react-native/ReactNativeApi.d.ts > $SCRATCH_DIR/ReactNativeApi-after.d.ts \ + || echo "" > $SCRATCH_DIR/ReactNativeApi.d.ts + - name: Run breaking change detection + shell: bash + env: + SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes + run: | + node ./scripts/diff-api-snapshot \ + ${{ github.workspace }}/packages/react-native/ReactNativeApi.d.ts \ + $SCRATCH_DIR/ReactNativeApi-after.d.ts \ + > $SCRATCH_DIR/output.json diff --git a/.github/workflows/danger-pr.yml b/.github/workflows/danger-pr.yml index 39a0e1c4922a15..cf28b788105a76 100644 --- a/.github/workflows/danger-pr.yml +++ b/.github/workflows/danger-pr.yml @@ -22,6 +22,8 @@ jobs: uses: ./.github/actions/setup-node - name: Run yarn install uses: ./.github/actions/yarn-install + - name: Run diff-js-api-breaking-changes + uses: ./.github/actions/diff-js-api-breaking-changes - name: Danger run: yarn danger ci --use-github-checks --failOnErrors working-directory: private/react-native-bots diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap deleted file mode 100644 index 945426fbe0804c..00000000000000 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ /dev/null @@ -1,9890 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`public API should not change unintentionally Libraries/ActionSheetIOS/ActionSheetIOS.js 1`] = ` -"export type ActionSheetIOSOptions = $ReadOnly<{ - title?: ?string, - message?: ?string, - options: Array, - destructiveButtonIndex?: ?number | ?Array, - cancelButtonIndex?: ?number, - anchor?: ?number, - tintColor?: ColorValue | ProcessedColorValue, - cancelButtonTintColor?: ColorValue | ProcessedColorValue, - disabledButtonTintColor?: ColorValue | ProcessedColorValue, - userInterfaceStyle?: string, - disabledButtonIndices?: Array, -}>; -export type ShareActionSheetIOSOptions = $ReadOnly<{ - message?: ?string, - url?: ?string, - subject?: ?string, - anchor?: ?number, - tintColor?: ?number, - cancelButtonTintColor?: ?number, - disabledButtonTintColor?: ?number, - excludedActivityTypes?: ?Array, - userInterfaceStyle?: ?string, -}>; -export type ShareActionSheetError = $ReadOnly<{ - domain: string, - code: string, - userInfo?: ?Object, - message: string, -}>; -declare const ActionSheetIOS: { - showActionSheetWithOptions( - options: ActionSheetIOSOptions, - callback: (buttonIndex: number) => void - ): void, - showShareActionSheetWithOptions( - options: ShareActionSheetIOSOptions, - failureCallback: Function | ((error: ShareActionSheetError) => void), - successCallback: Function | ((success: boolean, method: ?string) => void) - ): void, - dismissActionSheet: () => void, -}; -declare export default typeof ActionSheetIOS; -" -`; - -exports[`public API should not change unintentionally Libraries/ActionSheetIOS/NativeActionSheetManager.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeActionSheetManager\\"; -declare export default typeof NativeActionSheetManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Alert/Alert.js 1`] = ` -"export type AlertType = - | \\"default\\" - | \\"plain-text\\" - | \\"secure-text\\" - | \\"login-password\\"; -export type AlertButtonStyle = \\"default\\" | \\"cancel\\" | \\"destructive\\"; -export type AlertButton = { - text?: string, - onPress?: ?((value?: string) => any) | ?Function, - isPreferred?: boolean, - style?: AlertButtonStyle, - ... -}; -export type AlertButtons = Array; -export type AlertOptions = { - cancelable?: ?boolean, - userInterfaceStyle?: \\"unspecified\\" | \\"light\\" | \\"dark\\", - onDismiss?: ?() => void, - ... -}; -declare class Alert { - static alert( - title: ?string, - message?: ?string, - buttons?: AlertButtons, - options?: AlertOptions - ): void; - static prompt( - title: ?string, - message?: ?string, - callbackOrButtons?: ?(((text: string) => void) | AlertButtons), - type?: ?AlertType, - defaultValue?: string, - keyboardType?: string, - options?: AlertOptions - ): void; -} -declare export default typeof Alert; -" -`; - -exports[`public API should not change unintentionally Libraries/Alert/NativeAlertManager.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeAlertManager\\"; -declare export default typeof NativeAlertManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Alert/RCTAlertManager.js 1`] = ` -"export * from \\"./RCTAlertManager\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Alert/RCTAlertManager.js.flow 1`] = ` -"declare export function alertWithArgs( - args: Args, - callback: (id: number, value: string) => void -): void; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/Animated.js 1`] = ` -"declare const Animated: AnimatedExports; -declare export default typeof Animated; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/Animated.js.flow 1`] = ` -"export * as default from \\"./AnimatedExports\\"; -export type { CompositeAnimation, Numeric } from \\"./AnimatedImplementation\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/AnimatedEvent.js 1`] = ` -"export type Mapping = - | { [key: string]: Mapping, ... } - | AnimatedValue - | AnimatedValueXY; -export type EventConfig = { - listener?: ?(NativeSyntheticEvent) => mixed, - useNativeDriver: boolean, - platformConfig?: PlatformConfig, -}; -declare export function attachNativeEventImpl( - viewRef: any, - eventName: string, - argMapping: $ReadOnlyArray, - platformConfig: ?PlatformConfig -): { detach: () => void }; -declare export class AnimatedEvent { - constructor( - argMapping: $ReadOnlyArray, - config: EventConfig - ): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/AnimatedExports.js 1`] = ` -"declare const Animated: typeof AnimatedImplementation; -declare export default { - get FlatList(): AnimatedFlatList, - get Image(): AnimatedImage, - get ScrollView(): AnimatedScrollView, - get SectionList(): AnimatedSectionList, - get Text(): AnimatedText, - get View(): AnimatedView, - ...typeof Animated, -}; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/AnimatedExports.js.flow 1`] = ` -"export type { DecayAnimationConfig } from \\"./animations/DecayAnimation\\"; -export type { SpringAnimationConfig } from \\"./animations/SpringAnimation\\"; -export type { TimingAnimationConfig } from \\"./animations/TimingAnimation\\"; -export { default as FlatList } from \\"./components/AnimatedFlatList\\"; -export { default as Image } from \\"./components/AnimatedImage\\"; -export { default as ScrollView } from \\"./components/AnimatedScrollView\\"; -export { default as SectionList } from \\"./components/AnimatedSectionList\\"; -export { default as Text } from \\"./components/AnimatedText\\"; -export { default as View } from \\"./components/AnimatedView\\"; -export { default as Color } from \\"./nodes/AnimatedColor\\"; -export { AnimatedEvent as Event } from \\"./AnimatedEvent\\"; -export { default as Interpolation } from \\"./nodes/AnimatedInterpolation\\"; -export { default as Node } from \\"./nodes/AnimatedNode\\"; -export { default as Value } from \\"./nodes/AnimatedValue\\"; -export { default as ValueXY } from \\"./nodes/AnimatedValueXY\\"; -export type { default as AnimatedInterpolation } from \\"./nodes/AnimatedInterpolation\\"; -export type { default as AnimatedColor } from \\"./nodes/AnimatedColor\\"; -export type { AnimatedValueConfig as AnimatedConfig } from \\"./nodes/AnimatedValue\\"; -export type { default as AnimatedNode } from \\"./nodes/AnimatedNode\\"; -export type { default as AnimatedAddition } from \\"./nodes/AnimatedAddition\\"; -export type { default as AnimatedDiffClamp } from \\"./nodes/AnimatedDiffClamp\\"; -export type { default as AnimatedDivision } from \\"./nodes/AnimatedDivision\\"; -export type { InterpolationConfigType as InterpolationConfig } from \\"./nodes/AnimatedInterpolation\\"; -export type { default as AnimatedModulo } from \\"./nodes/AnimatedModulo\\"; -export type { default as AnimatedMultiplication } from \\"./nodes/AnimatedMultiplication\\"; -export type { default as AnimatedSubtraction } from \\"./nodes/AnimatedSubtraction\\"; -export type { - WithAnimatedValue, - AnimatedProps, -} from \\"./createAnimatedComponent\\"; -export type { AnimatedComponentType as AnimatedComponent } from \\"./createAnimatedComponent\\"; -declare export const add: typeof AnimatedImplementation.add; -declare export const attachNativeEvent: typeof AnimatedImplementation.attachNativeEvent; -declare export const createAnimatedComponent: typeof AnimatedImplementation.createAnimatedComponent; -declare export const decay: typeof AnimatedImplementation.decay; -declare export const delay: typeof AnimatedImplementation.delay; -declare export const diffClamp: typeof AnimatedImplementation.diffClamp; -declare export const divide: typeof AnimatedImplementation.divide; -declare export const event: typeof AnimatedImplementation.event; -declare export const forkEvent: typeof AnimatedImplementation.forkEvent; -declare export const loop: typeof AnimatedImplementation.loop; -declare export const modulo: typeof AnimatedImplementation.modulo; -declare export const multiply: typeof AnimatedImplementation.multiply; -declare export const parallel: typeof AnimatedImplementation.parallel; -declare export const sequence: typeof AnimatedImplementation.sequence; -declare export const spring: typeof AnimatedImplementation.spring; -declare export const stagger: typeof AnimatedImplementation.stagger; -declare export const subtract: typeof AnimatedImplementation.subtract; -declare export const timing: typeof AnimatedImplementation.timing; -declare export const unforkEvent: typeof AnimatedImplementation.unforkEvent; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/AnimatedImplementation.js 1`] = ` -"export type CompositeAnimation = { - start: (callback?: ?EndCallback, isLooping?: boolean) => void, - stop: () => void, - reset: () => void, - ... -}; -declare const addImpl: ( - a: AnimatedNode | number, - b: AnimatedNode | number -) => AnimatedAddition; -declare const subtractImpl: ( - a: AnimatedNode | number, - b: AnimatedNode | number -) => AnimatedSubtraction; -declare const divideImpl: ( - a: AnimatedNode | number, - b: AnimatedNode | number -) => AnimatedDivision; -declare const multiplyImpl: ( - a: AnimatedNode | number, - b: AnimatedNode | number -) => AnimatedMultiplication; -declare const moduloImpl: (a: AnimatedNode, modulus: number) => AnimatedModulo; -declare const diffClampImpl: ( - a: AnimatedNode, - min: number, - max: number -) => AnimatedDiffClamp; -declare const springImpl: ( - value: AnimatedValue | AnimatedValueXY | AnimatedColor, - config: SpringAnimationConfig -) => CompositeAnimation; -declare const timingImpl: ( - value: AnimatedValue | AnimatedValueXY | AnimatedColor, - config: TimingAnimationConfig -) => CompositeAnimation; -declare const decayImpl: ( - value: AnimatedValue | AnimatedValueXY | AnimatedColor, - config: DecayAnimationConfig -) => CompositeAnimation; -declare const sequenceImpl: ( - animations: Array -) => CompositeAnimation; -type ParallelConfig = { - stopTogether?: boolean, - ... -}; -declare const parallelImpl: ( - animations: Array, - config?: ?ParallelConfig -) => CompositeAnimation; -declare const delayImpl: (time: number) => CompositeAnimation; -declare const staggerImpl: ( - time: number, - animations: Array -) => CompositeAnimation; -type LoopAnimationConfig = { - iterations: number, - resetBeforeIteration?: boolean, - ... -}; -declare const loopImpl: ( - animation: CompositeAnimation, - $$PARAM_1$$?: LoopAnimationConfig -) => CompositeAnimation; -declare function forkEventImpl( - event: ?AnimatedEvent | ?Function, - listener: Function -): AnimatedEvent | Function; -declare function unforkEventImpl( - event: ?AnimatedEvent | ?Function, - listener: Function -): void; -declare const eventImpl: ( - argMapping: $ReadOnlyArray, - config: EventConfig -) => any; -type AnimatedNumeric = - | AnimatedAddition - | AnimatedDiffClamp - | AnimatedDivision - | AnimatedInterpolation - | AnimatedModulo - | AnimatedMultiplication - | AnimatedSubtraction - | AnimatedValue; -export type { AnimatedNumeric as Numeric }; -declare export default { - Value: typeof AnimatedValue, - ValueXY: typeof AnimatedValueXY, - Color: typeof AnimatedColor, - Interpolation: typeof AnimatedInterpolation, - Node: typeof AnimatedNode, - decay: typeof decayImpl, - timing: typeof timingImpl, - spring: typeof springImpl, - add: typeof addImpl, - subtract: typeof subtractImpl, - divide: typeof divideImpl, - multiply: typeof multiplyImpl, - modulo: typeof moduloImpl, - diffClamp: typeof diffClampImpl, - delay: typeof delayImpl, - sequence: typeof sequenceImpl, - parallel: typeof parallelImpl, - stagger: typeof staggerImpl, - loop: typeof loopImpl, - event: typeof eventImpl, - createAnimatedComponent: typeof createAnimatedComponent, - attachNativeEvent: typeof attachNativeEventImpl, - forkEvent: typeof forkEventImpl, - unforkEvent: typeof unforkEventImpl, - Event: typeof AnimatedEvent, -}; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/AnimatedMock.js 1`] = ` -"export type CompositeAnimation = { - start: (callback?: ?EndCallback) => void, - stop: () => void, - reset: () => void, - ... -}; -export type { AnimatedNumeric as Numeric }; -declare export default typeof AnimatedImplementation; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/AnimatedPlatformConfig.js 1`] = ` -"export type PlatformConfig = {}; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/Easing.js 1`] = ` -"export type EasingFunction = (t: number) => number; -declare const EasingStatic: { - step0(n: number): number, - step1(n: number): number, - linear(t: number): number, - ease(t: number): number, - quad(t: number): number, - cubic(t: number): number, - poly(n: number): EasingFunction, - sin(t: number): number, - circle(t: number): number, - exp(t: number): number, - elastic(bounciness?: number): EasingFunction, - back(s?: number): EasingFunction, - bounce(t: number): number, - bezier(x1: number, y1: number, x2: number, y2: number): EasingFunction, - in(easing: EasingFunction): EasingFunction, - out(easing: EasingFunction): EasingFunction, - inOut(easing: EasingFunction): EasingFunction, -}; -export type Easing = typeof EasingStatic; -declare export default typeof EasingStatic; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/NativeAnimatedAllowlist.js 1`] = ` -"declare export default AnimatedPropsAllowlist; -declare export function allowInterpolationParam(param: string): void; -declare export function allowStyleProp(prop: string): void; -declare export function allowTransformProp(prop: string): void; -declare export function isSupportedColorStyleProp(prop: string): boolean; -declare export function isSupportedInterpolationParam(param: string): boolean; -declare export function isSupportedStyleProp(prop: string): boolean; -declare export function isSupportedTransformProp(prop: string): boolean; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/NativeAnimatedModule.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeAnimatedModule\\"; -declare export default typeof NativeAnimatedModule; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/NativeAnimatedTurboModule.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule\\"; -declare export default typeof NativeAnimatedTurboModule; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/SpringConfig.js 1`] = ` -"type SpringConfigType = { - stiffness: number, - damping: number, - ... -}; -declare export function fromOrigamiTensionAndFriction( - tension: number, - friction: number -): SpringConfigType; -declare export function fromBouncinessAndSpeed( - bounciness: number, - speed: number -): SpringConfigType; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/animations/Animation.js 1`] = ` -"export type EndResult = { - finished: boolean, - value?: number, - offset?: number, - ... -}; -export type EndCallback = (result: EndResult) => void; -export type AnimationConfig = $ReadOnly<{ - isInteraction?: boolean, - useNativeDriver: boolean, - platformConfig?: PlatformConfig, - onComplete?: ?EndCallback, - iterations?: number, - isLooping?: boolean, - debugID?: ?string, - ... -}>; -declare export default class Animation { - constructor(config: AnimationConfig): void; - start( - fromValue: number, - onUpdate: (value: number) => void, - onEnd: ?EndCallback, - previousAnimation: ?Animation, - animatedValue: AnimatedValue - ): void; - stop(): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/animations/DecayAnimation.js 1`] = ` -"export type DecayAnimationConfig = $ReadOnly<{ - ...AnimationConfig, - velocity: - | number - | $ReadOnly<{ - x: number, - y: number, - ... - }>, - deceleration?: number, - ... -}>; -export type DecayAnimationConfigSingle = $ReadOnly<{ - ...AnimationConfig, - velocity: number, - deceleration?: number, - ... -}>; -declare export default class DecayAnimation extends Animation { - constructor(config: DecayAnimationConfigSingle): void; - start( - fromValue: number, - onUpdate: (value: number) => void, - onEnd: ?EndCallback, - previousAnimation: ?Animation, - animatedValue: AnimatedValue - ): void; - onUpdate(): void; - stop(): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/animations/SpringAnimation.js 1`] = ` -"export type SpringAnimationConfig = $ReadOnly<{ - ...AnimationConfig, - toValue: - | number - | AnimatedValue - | { - x: number, - y: number, - ... - } - | AnimatedValueXY - | { - r: number, - g: number, - b: number, - a: number, - ... - } - | AnimatedColor - | AnimatedInterpolation, - overshootClamping?: boolean, - restDisplacementThreshold?: number, - restSpeedThreshold?: number, - velocity?: - | number - | $ReadOnly<{ - x: number, - y: number, - ... - }>, - bounciness?: number, - speed?: number, - tension?: number, - friction?: number, - stiffness?: number, - damping?: number, - mass?: number, - delay?: number, - ... -}>; -export type SpringAnimationConfigSingle = $ReadOnly<{ - ...AnimationConfig, - toValue: number, - overshootClamping?: boolean, - restDisplacementThreshold?: number, - restSpeedThreshold?: number, - velocity?: number, - bounciness?: number, - speed?: number, - tension?: number, - friction?: number, - stiffness?: number, - damping?: number, - mass?: number, - delay?: number, - ... -}>; -declare opaque type SpringAnimationInternalState; -declare export default class SpringAnimation extends Animation { - constructor(config: SpringAnimationConfigSingle): void; - start( - fromValue: number, - onUpdate: (value: number) => void, - onEnd: ?EndCallback, - previousAnimation: ?Animation, - animatedValue: AnimatedValue - ): void; - getInternalState(): SpringAnimationInternalState; - onUpdate(): void; - stop(): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/animations/TimingAnimation.js 1`] = ` -"export type TimingAnimationConfig = $ReadOnly<{ - ...AnimationConfig, - toValue: - | number - | AnimatedValue - | $ReadOnly<{ - x: number, - y: number, - ... - }> - | AnimatedValueXY - | RgbaValue - | AnimatedColor - | AnimatedInterpolation, - easing?: (value: number) => number, - duration?: number, - delay?: number, - ... -}>; -export type TimingAnimationConfigSingle = $ReadOnly<{ - ...AnimationConfig, - toValue: number, - easing?: (value: number) => number, - duration?: number, - delay?: number, - ... -}>; -declare export default class TimingAnimation extends Animation { - constructor(config: TimingAnimationConfigSingle): void; - start( - fromValue: number, - onUpdate: (value: number) => void, - onEnd: ?EndCallback, - previousAnimation: ?Animation, - animatedValue: AnimatedValue - ): void; - onUpdate(): void; - stop(): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/bezier.js 1`] = ` -"declare export default function bezier( - mX1: number, - mY1: number, - mX2: number, - mY2: number -): (x: number) => number; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedFlatList.js 1`] = ` -"declare export default component( - ref?: React.RefSetter>, - ...props: AnimatedProps> -); -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedImage.js 1`] = ` -"declare export default AnimatedComponentType< - React.ElementConfig, - React.ElementRef, ->; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedScrollView.js 1`] = ` -"type AnimatedScrollViewInstance = React.ElementRef; -declare const AnimatedScrollView: AnimatedComponentType< - ScrollViewProps, - AnimatedScrollViewInstance, ->; -declare export default typeof AnimatedScrollView; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedSectionList.js 1`] = ` -"declare export default component( - ref?: React.RefSetter>, - ...props: AnimatedProps> -); -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedText.js 1`] = ` -"declare export default AnimatedComponentType< - TextProps, - React.ElementRef, ->; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedView.js 1`] = ` -"declare export default AnimatedComponentType< - ViewProps, - React.ElementRef, ->; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/createAnimatedComponent.js 1`] = ` -"type Nullable = void | null; -type Primitive = string | number | boolean | symbol | void; -type Builtin = (...$ReadOnlyArray) => mixed | Date | Error | RegExp; -export type WithAnimatedValue<+T> = T extends Builtin | Nullable - ? T - : T extends Primitive - ? - | T - | AnimatedNode - | AnimatedAddition - | AnimatedSubtraction - | AnimatedDivision - | AnimatedMultiplication - | AnimatedModulo - | AnimatedDiffClamp - | AnimatedValue - | AnimatedInterpolation - | AnimatedInterpolation - | AnimatedInterpolation - : T extends $ReadOnlyArray - ? $ReadOnlyArray> - : T extends { ... } - ? { +[K in keyof T]: WithAnimatedValue } - : T; -type NonAnimatedProps = - | \\"ref\\" - | \\"innerViewRef\\" - | \\"scrollViewRef\\" - | \\"testID\\" - | \\"disabled\\" - | \\"accessibilityLabel\\"; -type PassThroughProps = $ReadOnly<{ - passthroughAnimatedPropExplicitValues?: ViewProps | null, -}>; -export type AnimatedProps = { - [K in keyof Props]: K extends NonAnimatedProps - ? Props[K] - : WithAnimatedValue, -} & PassThroughProps; -export type AnimatedBaseProps = { - [K in keyof Props]: K extends NonAnimatedProps - ? Props[K] - : WithAnimatedValue, -}; -export type AnimatedComponentType< - Props: { ... }, - +Instance = mixed, -> = component(ref?: React.RefSetter, ...AnimatedProps); -declare export default function createAnimatedComponent< - TInstance: React.ComponentType, ->( - Component: TInstance -): AnimatedComponentType< - $ReadOnly>, - React.ElementRef, ->; -declare export function unstable_createAnimatedComponentWithAllowlist< - TProps: { ... }, - TInstance: React.ComponentType, ->( - Component: TInstance, - allowlist: ?AnimatedPropsAllowlist -): AnimatedComponentType>; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedAddition.js 1`] = ` -"declare export default class AnimatedAddition extends AnimatedWithChildren { - constructor( - a: AnimatedNode | number, - b: AnimatedNode | number, - config?: ?AnimatedNodeConfig - ): void; - interpolate( - config: InterpolationConfigType - ): AnimatedInterpolation; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedColor.js 1`] = ` -"export type AnimatedColorConfig = $ReadOnly<{ - ...AnimatedNodeConfig, - useNativeDriver: boolean, -}>; -type ColorListenerCallback = (value: ColorValue) => mixed; -export type RgbaValue = { - +r: number, - +g: number, - +b: number, - +a: number, - ... -}; -type RgbaAnimatedValue = { - +r: AnimatedValue, - +g: AnimatedValue, - +b: AnimatedValue, - +a: AnimatedValue, - ... -}; -export type InputValue = ?(RgbaValue | RgbaAnimatedValue | ColorValue); -declare export default class AnimatedColor extends AnimatedWithChildren { - r: AnimatedValue; - g: AnimatedValue; - b: AnimatedValue; - a: AnimatedValue; - nativeColor: ?NativeColorValue; - constructor(valueIn?: InputValue, config?: ?AnimatedColorConfig): void; - setValue(value: RgbaValue | ColorValue): void; - setOffset(offset: RgbaValue): void; - flattenOffset(): void; - extractOffset(): void; - stopAnimation(callback?: ColorListenerCallback): void; - resetAnimation(callback?: ColorListenerCallback): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedDiffClamp.js 1`] = ` -"declare export default class AnimatedDiffClamp extends AnimatedWithChildren { - constructor( - a: AnimatedNode, - min: number, - max: number, - config?: ?AnimatedNodeConfig - ): void; - interpolate( - config: InterpolationConfigType - ): AnimatedInterpolation; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedDivision.js 1`] = ` -"declare export default class AnimatedDivision extends AnimatedWithChildren { - constructor( - a: AnimatedNode | number, - b: AnimatedNode | number, - config?: ?AnimatedNodeConfig - ): void; - interpolate( - config: InterpolationConfigType - ): AnimatedInterpolation; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedInterpolation.js 1`] = ` -"type ExtrapolateType = \\"extend\\" | \\"identity\\" | \\"clamp\\"; -export type InterpolationConfigType = $ReadOnly<{ - ...AnimatedNodeConfig, - inputRange: $ReadOnlyArray, - outputRange: $ReadOnlyArray, - easing?: (input: number) => number, - extrapolate?: ExtrapolateType, - extrapolateLeft?: ExtrapolateType, - extrapolateRight?: ExtrapolateType, -}>; -declare export default class AnimatedInterpolation - extends AnimatedWithChildren -{ - constructor( - parent: AnimatedNode, - config: InterpolationConfigType - ): void; - interpolate( - config: InterpolationConfigType - ): AnimatedInterpolation; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedModulo.js 1`] = ` -"declare export default class AnimatedModulo extends AnimatedWithChildren { - constructor( - a: AnimatedNode, - modulus: number, - config?: ?AnimatedNodeConfig - ): void; - interpolate( - config: InterpolationConfigType - ): AnimatedInterpolation; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedMultiplication.js 1`] = ` -"declare export default class AnimatedMultiplication - extends AnimatedWithChildren -{ - constructor( - a: AnimatedNode | number, - b: AnimatedNode | number, - config?: ?AnimatedNodeConfig - ): void; - interpolate( - config: InterpolationConfigType - ): AnimatedInterpolation; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedNode.js 1`] = ` -"export type AnimatedNodeConfig = $ReadOnly<{ - debugID?: string, -}>; -declare export default class AnimatedNode { - constructor( - config?: ?$ReadOnly<{ - ...AnimatedNodeConfig, - ... - }> - ): void; - addListener(callback: (value: any) => mixed): string; - removeListener(id: string): void; - removeAllListeners(): void; - hasListeners(): boolean; - toJSON(): mixed; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedObject.js 1`] = ` -"declare export function isPlainObject( - value: mixed -): value is $ReadOnly<{ [string]: mixed }>; -declare export default class AnimatedObject extends AnimatedWithChildren { - static from(value: mixed): ?AnimatedObject; - constructor( - nodes: $ReadOnlyArray, - value: mixed, - config?: ?AnimatedNodeConfig - ): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedProps.js 1`] = ` -"export type AnimatedPropsAllowlist = $ReadOnly<{ - style?: ?AnimatedStyleAllowlist, - [key: string]: true | AnimatedStyleAllowlist, -}>; -type TargetViewInstance = React.ElementRef; -declare export default class AnimatedProps extends AnimatedNode { - constructor( - inputProps: { [string]: mixed }, - callback: () => void, - allowlist?: ?AnimatedPropsAllowlist, - config?: ?AnimatedNodeConfig - ): void; - update(): void; - setNativeView(instance: TargetViewInstance): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedStyle.js 1`] = ` -"export type AnimatedStyleAllowlist = $ReadOnly<{ [string]: true }>; -type FlatStyle = { [string]: mixed }; -type FlatStyleForWeb = [mixed, TStyle]; -declare export default class AnimatedStyle extends AnimatedWithChildren { - static from( - flatStyle: ?FlatStyle, - allowlist: ?AnimatedStyleAllowlist, - originalStyleForWeb: ?mixed - ): ?AnimatedStyle; - constructor( - nodeKeys: $ReadOnlyArray, - nodes: $ReadOnlyArray, - style: { [string]: mixed }, - originalStyleForWeb: ?mixed, - config?: ?AnimatedNodeConfig - ): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedSubtraction.js 1`] = ` -"declare export default class AnimatedSubtraction extends AnimatedWithChildren { - constructor( - a: AnimatedNode | number, - b: AnimatedNode | number, - config?: ?AnimatedNodeConfig - ): void; - interpolate( - config: InterpolationConfigType - ): AnimatedInterpolation; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedTracking.js 1`] = ` -"declare export default class AnimatedTracking extends AnimatedNode { - constructor( - value: AnimatedValue, - parent: AnimatedNode, - animationClass: any, - animationConfig: Object, - callback?: ?EndCallback, - config?: ?AnimatedNodeConfig - ): void; - update(): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedTransform.js 1`] = ` -"type Transform = { - [string]: - | number - | string - | T - | $ReadOnlyArray - | { [string]: number | string | T }, -}; -declare export default class AnimatedTransform extends AnimatedWithChildren { - static from(transforms: $ReadOnlyArray>): ?AnimatedTransform; - constructor( - nodes: $ReadOnlyArray, - transforms: $ReadOnlyArray>, - config?: ?AnimatedNodeConfig - ): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedValue.js 1`] = ` -"export type AnimatedValueConfig = $ReadOnly<{ - ...AnimatedNodeConfig, - useNativeDriver: boolean, -}>; -declare export function flushValue(rootNode: AnimatedNode): void; -declare export default class AnimatedValue extends AnimatedWithChildren { - constructor(value: number, config?: ?AnimatedValueConfig): void; - addListener(callback: (value: any) => mixed): string; - removeListener(id: string): void; - removeAllListeners(): void; - setValue(value: number): void; - setOffset(offset: number): void; - flattenOffset(): void; - extractOffset(): void; - stopAnimation(callback?: ?(value: number) => void): void; - resetAnimation(callback?: ?(value: number) => void): void; - interpolate( - config: InterpolationConfigType - ): AnimatedInterpolation; - animate(animation: Animation, callback: ?EndCallback): void; - stopTracking(): void; - track(tracking: AnimatedTracking): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedValueXY.js 1`] = ` -"export type AnimatedValueXYConfig = $ReadOnly<{ - ...AnimatedNodeConfig, - useNativeDriver: boolean, -}>; -type ValueXYListenerCallback = (value: { x: number, y: number, ... }) => mixed; -declare export default class AnimatedValueXY extends AnimatedWithChildren { - x: AnimatedValue; - y: AnimatedValue; - constructor( - valueIn?: ?{ - +x: number | AnimatedValue, - +y: number | AnimatedValue, - ... - }, - config?: ?AnimatedValueXYConfig - ): void; - setValue(value: { x: number, y: number, ... }): void; - setOffset(offset: { x: number, y: number, ... }): void; - flattenOffset(): void; - extractOffset(): void; - resetAnimation( - callback?: (value: { x: number, y: number, ... }) => void - ): void; - stopAnimation( - callback?: (value: { x: number, y: number, ... }) => void - ): void; - addListener(callback: ValueXYListenerCallback): string; - removeListener(id: string): void; - removeAllListeners(): void; - getLayout(): { [key: string]: AnimatedValue, ... }; - getTranslateTransform(): Array< - { translateX: AnimatedValue } | { translateY: AnimatedValue }, - >; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedWithChildren.js 1`] = ` -"declare export default class AnimatedWithChildren extends AnimatedNode {} -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/shouldUseTurboAnimatedModule.js 1`] = ` -"declare function shouldUseTurboAnimatedModule(): boolean; -declare export default typeof shouldUseTurboAnimatedModule; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/useAnimatedProps.js 1`] = ` -"declare export default AnimatedPropsHook; -" -`; - -exports[`public API should not change unintentionally Libraries/Animated/useAnimatedValue.js 1`] = ` -"declare export default function useAnimatedValue( - initialValue: number, - config?: ?Animated.AnimatedConfig -): Animated.Value; -" -`; - -exports[`public API should not change unintentionally Libraries/AppState/AppState.js 1`] = ` -"export type AppStateStatus = - | \\"inactive\\" - | \\"background\\" - | \\"active\\" - | \\"extension\\" - | \\"unknown\\"; -type AppStateEventDefinitions = { - change: [AppStateStatus], - memoryWarning: [], - blur: [], - focus: [], -}; -export type AppStateEvent = $Keys; -type NativeAppStateEventDefinitions = { - appStateDidChange: [{ app_state: AppStateStatus }], - appStateFocusChange: [boolean], - memoryWarning: [], -}; -declare class AppStateImpl { - currentState: ?string; - isAvailable: boolean; - constructor(): void; - addEventListener( - type: K, - handler: (...AppStateEventDefinitions[K]) => void - ): EventSubscription; -} -declare const AppState: AppStateImpl; -declare export default typeof AppState; -" -`; - -exports[`public API should not change unintentionally Libraries/AppState/NativeAppState.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeAppState\\"; -declare export default typeof NativeAppState; -" -`; - -exports[`public API should not change unintentionally Libraries/BatchedBridge/BatchedBridge.js 1`] = ` -"declare const BatchedBridge: MessageQueue; -declare export default typeof BatchedBridge; -" -`; - -exports[`public API should not change unintentionally Libraries/BatchedBridge/MessageQueue.js 1`] = ` -"export type SpyData = { - type: number, - module: ?string, - method: string | number, - args: mixed[], - ... -}; -declare class MessageQueue { - constructor(): void; - static spy(spyOrToggle: boolean | ((data: SpyData) => void)): void; - callFunctionReturnFlushedQueue( - module: string, - method: string, - args: mixed[] - ): null | [Array, Array, Array, number]; - invokeCallbackAndReturnFlushedQueue( - cbID: number, - args: mixed[] - ): null | [Array, Array, Array, number]; - flushedQueue(): null | [Array, Array, Array, number]; - getEventLoopRunningTime(): number; - registerCallableModule(name: string, module: { ... }): void; - registerLazyCallableModule( - name: string, - factory: (void) => interface {} - ): void; - getCallableModule(name: string): { ... } | null; - callNativeSyncHook( - moduleID: number, - methodID: number, - params: mixed[], - onFail: ?(...mixed[]) => void, - onSucc: ?(...mixed[]) => void - ): mixed; - processCallbacks( - moduleID: number, - methodID: number, - params: mixed[], - onFail: ?(...mixed[]) => void, - onSucc: ?(...mixed[]) => void - ): void; - enqueueNativeCall( - moduleID: number, - methodID: number, - params: mixed[], - onFail: ?(...mixed[]) => void, - onSucc: ?(...mixed[]) => void - ): void; - createDebugLookup( - moduleID: number, - name: string, - methods: ?$ReadOnlyArray - ): void; - setReactNativeMicrotasksCallback(fn: () => void): void; -} -declare export default typeof MessageQueue; -" -`; - -exports[`public API should not change unintentionally Libraries/BatchedBridge/NativeModules.js 1`] = ` -"export type ModuleConfig = [ - string, - ?{ ... }, - ?$ReadOnlyArray, - ?$ReadOnlyArray, - ?$ReadOnlyArray, -]; -export type MethodType = \\"async\\" | \\"promise\\" | \\"sync\\"; -declare let NativeModules: { [moduleName: string]: any, ... }; -declare export default typeof NativeModules; -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/Blob.js 1`] = ` -"declare class Blob { - constructor(parts?: Array, options?: BlobOptions): void; - set data(data: ?BlobData): void; - get data(): BlobData; - slice(start?: number, end?: number, contentType?: string): Blob; - close(): void; - get size(): number; - get type(): string; -} -declare export default typeof Blob; -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/BlobManager.js 1`] = ` -"declare class BlobManager { - static isAvailable: boolean; - static createFromParts( - parts: Array, - options?: BlobOptions - ): Blob; - static createFromOptions(options: BlobData): Blob; - static release(blobId: string): void; - static addNetworkingHandler(): void; - static addWebSocketHandler(socketId: number): void; - static removeWebSocketHandler(socketId: number): void; - static sendOverSocket(blob: Blob, socketId: number): void; -} -declare export default typeof BlobManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/BlobRegistry.js 1`] = ` -"declare export const register: (id: string) => void; -declare export const unregister: (id: string) => void; -declare export const has: (id: string) => number | boolean; -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/BlobTypes.js 1`] = ` -"declare export opaque type BlobCollector; -export type BlobData = { - blobId: string, - offset: number, - size: number, - name?: string, - type?: string, - lastModified?: number, - ... -}; -export type BlobOptions = { - type: string, - lastModified: number, - ... -}; -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/File.js 1`] = ` -"declare class File extends Blob { - constructor( - parts: Array, - name: string, - options?: BlobOptions - ): void; - get name(): string; - get lastModified(): number; -} -declare export default typeof File; -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/FileReader.js 1`] = ` -"type ReadyState = 0 | 1 | 2; -type ReaderResult = string | ArrayBuffer; -declare class FileReader extends EventTarget { - static EMPTY: number; - static LOADING: number; - static DONE: number; - EMPTY: number; - LOADING: number; - DONE: number; - constructor(): void; - readAsArrayBuffer(blob: ?Blob): void; - readAsDataURL(blob: ?Blob): void; - readAsText(blob: ?Blob, encoding?: string): void; - abort(): void; - get readyState(): ReadyState; - get error(): ?Error; - get result(): ?ReaderResult; - get onabort(): EventCallback | null; - set onabort(listener: ?EventCallback): void; - get onerror(): EventCallback | null; - set onerror(listener: ?EventCallback): void; - get onload(): EventCallback | null; - set onload(listener: ?EventCallback): void; - get onloadstart(): EventCallback | null; - set onloadstart(listener: ?EventCallback): void; - get onloadend(): EventCallback | null; - set onloadend(listener: ?EventCallback): void; - get onprogress(): EventCallback | null; - set onprogress(listener: ?EventCallback): void; -} -declare export default typeof FileReader; -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/NativeBlobModule.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeBlobModule\\"; -declare export default typeof NativeBlobModule; -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/NativeFileReaderModule.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeFileReaderModule\\"; -declare export default typeof NativeFileReaderModule; -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/URL.js 1`] = ` -"export { URLSearchParams } from \\"./URLSearchParams\\"; -declare export class URL { - static createObjectURL(blob: Blob): string; - static revokeObjectURL(url: string): void; - constructor(url: string, base?: string | URL): void; - get hash(): string; - get host(): string; - get hostname(): string; - get href(): string; - get origin(): string; - get password(): string; - get pathname(): string; - get port(): string; - get protocol(): string; - get search(): string; - get searchParams(): URLSearchParams; - toJSON(): string; - toString(): string; - get username(): string; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Blob/URLSearchParams.js.flow 1`] = ` -"declare export class URLSearchParams { - +size: number; - constructor( - params?: Record | string | Array<[string, string]> - ): void; - append(key: string, value: string): void; - delete(name: string): void; - get(name: string): string; - getAll(name: string): Array; - has(name: string): boolean; - set(name: string, value: string): void; - sort(): void; - @@iterator(): Iterator<[string, string]>; - toString(): string; - keys(): Iterator; - values(): Iterator; - entries(): Iterator<[string, string]>; -} -" -`; - -exports[`public API should not change unintentionally Libraries/BugReporting/BugReporting.js 1`] = ` -"type ExtraData = { [key: string]: string, ... }; -type SourceCallback = () => string; -type DebugData = { - extras: ExtraData, - files: ExtraData, - ... -}; -declare class BugReporting { - static addSource( - key: string, - callback: SourceCallback - ): { remove: () => void, ... }; - static addFileSource( - key: string, - callback: SourceCallback - ): { remove: () => void, ... }; - static collectExtraData(): DebugData; -} -declare export default typeof BugReporting; -" -`; - -exports[`public API should not change unintentionally Libraries/BugReporting/NativeBugReporting.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeBugReporting\\"; -declare export default typeof NativeBugReporting; -" -`; - -exports[`public API should not change unintentionally Libraries/BugReporting/dumpReactTree.js 1`] = ` -"declare function dumpReactTree(): string; -declare export default typeof dumpReactTree; -" -`; - -exports[`public API should not change unintentionally Libraries/BugReporting/getReactData.js 1`] = ` -"declare function getData(element: Object): Object; -declare export default typeof getData; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/AccessibilityInfo/AccessibilityInfo.js 1`] = ` -"type AccessibilityEventDefinitionsAndroid = { - accessibilityServiceChanged: [boolean], - highTextContrastChanged: [boolean], -}; -type AccessibilityEventDefinitionsIOS = { - announcementFinished: [{ announcement: string, success: boolean }], - boldTextChanged: [boolean], - grayscaleChanged: [boolean], - invertColorsChanged: [boolean], - reduceTransparencyChanged: [boolean], - darkerSystemColorsChanged: [boolean], -}; -type AccessibilityEventDefinitions = { - ...AccessibilityEventDefinitionsAndroid, - ...AccessibilityEventDefinitionsIOS, - change: [boolean], - reduceMotionChanged: [boolean], - screenReaderChanged: [boolean], -}; -type AccessibilityEventTypes = \\"click\\" | \\"focus\\" | \\"viewHoverEnter\\"; -declare const AccessibilityInfo: { - isBoldTextEnabled(): Promise, - isGrayscaleEnabled(): Promise, - isInvertColorsEnabled(): Promise, - isReduceMotionEnabled(): Promise, - isHighTextContrastEnabled(): Promise, - isDarkerSystemColorsEnabled(): Promise, - prefersCrossFadeTransitions(): Promise, - isReduceTransparencyEnabled(): Promise, - isScreenReaderEnabled(): Promise, - isAccessibilityServiceEnabled(): Promise, - addEventListener>( - eventName: K, - handler: (...AccessibilityEventDefinitions[K]) => void - ): EventSubscription, - setAccessibilityFocus(reactTag: number): void, - sendAccessibilityEvent( - handle: HostInstance, - eventType: AccessibilityEventTypes - ): void, - announceForAccessibility(announcement: string): void, - announceForAccessibilityWithOptions( - announcement: string, - options: { queue?: boolean } - ): void, - getRecommendedTimeoutMillis(originalTimeout: number): Promise, -}; -declare export default typeof AccessibilityInfo; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeAccessibilityInfo\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/modules/NativeAccessibilityInfo\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeAccessibilityManager\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/modules/NativeAccessibilityManager\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js 1`] = ` -"declare export default typeof legacySendAccessibilityEvent; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js.flow 1`] = ` -"declare function legacySendAccessibilityEvent( - reactTag: number, - eventType: string -): void; -declare export default typeof legacySendAccessibilityEvent; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ActivityIndicator/ActivityIndicator.js 1`] = ` -"type IndicatorSize = number | \\"small\\" | \\"large\\"; -type ActivityIndicatorIOSProps = $ReadOnly<{ - hidesWhenStopped?: ?boolean, -}>; -export type ActivityIndicatorProps = $ReadOnly<{ - ...ViewProps, - ...ActivityIndicatorIOSProps, - animating?: ?boolean, - color?: ?ColorValue, - size?: ?IndicatorSize, -}>; -declare const ActivityIndicator: component( - ref?: React.RefSetter>, - ...props: ActivityIndicatorProps -); -declare export default typeof ActivityIndicator; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Button.js 1`] = ` -"export type ButtonProps = $ReadOnly<{ - title: string, - onPress?: (event?: GestureResponderEvent) => mixed, - touchSoundDisabled?: ?boolean, - color?: ?ColorValue, - hasTVPreferredFocus?: ?boolean, - nextFocusDown?: ?number, - nextFocusForward?: ?number, - nextFocusLeft?: ?number, - nextFocusRight?: ?number, - nextFocusUp?: ?number, - accessibilityLabel?: ?string, - \\"aria-label\\"?: ?string, - disabled?: ?boolean, - testID?: ?string, - accessible?: ?boolean, - accessibilityActions?: ?$ReadOnlyArray, - onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed, - accessibilityState?: ?AccessibilityState, - \\"aria-busy\\"?: ?boolean, - \\"aria-checked\\"?: ?boolean | \\"mixed\\", - \\"aria-disabled\\"?: ?boolean, - \\"aria-expanded\\"?: ?boolean, - \\"aria-selected\\"?: ?boolean, - importantForAccessibility?: ?(\\"auto\\" | \\"yes\\" | \\"no\\" | \\"no-hide-descendants\\"), - accessibilityHint?: ?string, - accessibilityLanguage?: ?Stringish, -}>; -declare const NativeTouchable: - | typeof TouchableNativeFeedback - | typeof TouchableOpacity; -type ButtonRef = React.ElementRef; -declare const Button: component( - ref?: React.RefSetter, - ...props: ButtonProps -); -declare export default typeof Button; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Clipboard/Clipboard.js 1`] = ` -"declare export default { - getString(): Promise, - setString(content: string): void, -}; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Clipboard/NativeClipboard.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeClipboard\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/modules/NativeClipboard\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js 1`] = ` -"declare export default typeof DrawerLayoutAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow 1`] = ` -"export type { - DrawerLayoutAndroidProps, - DrawerSlideEvent, -} from \\"./DrawerLayoutAndroidTypes\\"; -declare export default typeof DrawerLayoutAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js 1`] = ` -"declare export default class DrawerLayoutAndroid - extends React.Component - implements DrawerLayoutAndroidMethods -{ - render(): React.Node; - openDrawer(): void; - closeDrawer(): void; - blur(): void; - focus(): void; - measure(callback: MeasureOnSuccessCallback): void; - measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; - measureLayout( - relativeToNativeNode: number, - onSuccess: MeasureLayoutOnSuccessCallback, - onFail?: () => void - ): void; - setNativeProps(nativeProps: Object): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js 1`] = ` -"export type DrawerStates = \\"Idle\\" | \\"Dragging\\" | \\"Settling\\"; -export type DrawerSlideEvent = NativeSyntheticEvent< - $ReadOnly<{ - offset: number, - }>, ->; -export type DrawerLayoutAndroidProps = $ReadOnly<{ - ...ViewProps, - keyboardDismissMode?: ?(\\"none\\" | \\"on-drag\\"), - drawerBackgroundColor?: ?ColorValue, - drawerPosition: ?(\\"left\\" | \\"right\\"), - drawerWidth?: ?number, - drawerLockMode?: ?(\\"unlocked\\" | \\"locked-closed\\" | \\"locked-open\\"), - onDrawerSlide?: ?(event: DrawerSlideEvent) => mixed, - onDrawerStateChanged?: ?(state: DrawerStates) => mixed, - onDrawerOpen?: ?() => mixed, - onDrawerClose?: ?() => mixed, - renderNavigationView: () => React.MixedElement, - statusBarBackgroundColor?: ?ColorValue, -}>; -export type DrawerLayoutAndroidState = { - drawerOpened: boolean, -}; -export interface DrawerLayoutAndroidMethods { - openDrawer(): void; - closeDrawer(): void; - blur(): void; - focus(): void; - measure(callback: MeasureOnSuccessCallback): void; - measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; - measureLayout( - relativeToNativeNode: number, - onSuccess: MeasureLayoutOnSuccessCallback, - onFail?: () => void - ): void; - setNativeProps(nativeProps: Object): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Keyboard/Keyboard.js 1`] = ` -"export type KeyboardEventName = $Keys; -export type KeyboardEventEasing = - | \\"easeIn\\" - | \\"easeInEaseOut\\" - | \\"easeOut\\" - | \\"linear\\" - | \\"keyboard\\"; -export type KeyboardMetrics = $ReadOnly<{ - screenX: number, - screenY: number, - width: number, - height: number, -}>; -export type KeyboardEvent = AndroidKeyboardEvent | IOSKeyboardEvent; -type BaseKeyboardEvent = { - duration: number, - easing: KeyboardEventEasing, - endCoordinates: KeyboardMetrics, -}; -export type AndroidKeyboardEvent = $ReadOnly<{ - ...BaseKeyboardEvent, - duration: 0, - easing: \\"keyboard\\", -}>; -export type IOSKeyboardEvent = $ReadOnly<{ - ...BaseKeyboardEvent, - startCoordinates: KeyboardMetrics, - isEventFromThisApp: boolean, -}>; -type KeyboardEventDefinitions = { - keyboardWillShow: [KeyboardEvent], - keyboardDidShow: [KeyboardEvent], - keyboardWillHide: [KeyboardEvent], - keyboardDidHide: [KeyboardEvent], - keyboardWillChangeFrame: [KeyboardEvent], - keyboardDidChangeFrame: [KeyboardEvent], -}; -declare class KeyboardImpl { - constructor(): void; - addListener>( - eventType: K, - listener: (...KeyboardEventDefinitions[K]) => mixed, - context?: mixed - ): EventSubscription; - removeAllListeners>(eventType: ?K): void; - dismiss(): void; - isVisible(): boolean; - metrics(): ?KeyboardMetrics; - scheduleLayoutAnimation(event: KeyboardEvent): void; -} -declare const Keyboard: KeyboardImpl; -declare export default typeof Keyboard; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Keyboard/KeyboardAvoidingView.js 1`] = ` -"export type KeyboardAvoidingViewProps = $ReadOnly<{ - ...ViewProps, - behavior?: ?(\\"height\\" | \\"position\\" | \\"padding\\"), - contentContainerStyle?: ?ViewStyleProp, - enabled?: ?boolean, - keyboardVerticalOffset?: number, -}>; -type KeyboardAvoidingViewState = { - bottom: number, -}; -declare class KeyboardAvoidingView - extends React.Component -{ - viewRef: { current: React.ElementRef | null, ... }; - constructor(props: KeyboardAvoidingViewProps): void; - componentDidUpdate( - _: KeyboardAvoidingViewProps, - prevState: KeyboardAvoidingViewState - ): void; - componentDidMount(): void; - componentWillUnmount(): void; - render(): React.Node; -} -declare export default typeof KeyboardAvoidingView; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Keyboard/NativeKeyboardObserver.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeKeyboardObserver\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/modules/NativeKeyboardObserver\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/LayoutConformance/LayoutConformance.js 1`] = ` -"export type LayoutConformanceProps = $ReadOnly<{ - mode: \\"strict\\" | \\"compatibility\\", - children: React.Node, -}>; -declare export default component(...LayoutConformanceProps); -" -`; - -exports[`public API should not change unintentionally Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js 1`] = ` -"type Props = $ReadOnly<{ - mode: \\"strict\\" | \\"compatibility\\", - ...ViewProps, -}>; -declare const LayoutConformanceNativeComponent: HostComponent; -declare export default typeof LayoutConformanceNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Pressable/Pressable.js 1`] = ` -"export type { PressableAndroidRippleConfig }; -export type PressableStateCallbackType = $ReadOnly<{ - pressed: boolean, -}>; -type PressableBaseProps = $ReadOnly<{ - cancelable?: ?boolean, - children?: React.Node | ((state: PressableStateCallbackType) => React.Node), - delayHoverIn?: ?number, - delayHoverOut?: ?number, - delayLongPress?: ?number, - disabled?: ?boolean, - hitSlop?: ?RectOrSize, - pressRetentionOffset?: ?RectOrSize, - onLayout?: ?(event: LayoutChangeEvent) => mixed, - onHoverIn?: ?(event: MouseEvent) => mixed, - onHoverOut?: ?(event: MouseEvent) => mixed, - onLongPress?: ?(event: GestureResponderEvent) => mixed, - onPress?: ?(event: GestureResponderEvent) => mixed, - onPressIn?: ?(event: GestureResponderEvent) => mixed, - onPressMove?: ?(event: GestureResponderEvent) => mixed, - onPressOut?: ?(event: GestureResponderEvent) => mixed, - style?: - | ViewStyleProp - | ((state: PressableStateCallbackType) => ViewStyleProp), - testID?: ?string, - android_disableSound?: ?boolean, - android_ripple?: ?PressableAndroidRippleConfig, - testOnly_pressed?: ?boolean, - unstable_pressDelay?: ?number, -}>; -export type PressableProps = $ReadOnly<{ - ...Omit, - ...PressableBaseProps, -}>; -declare export default component( - ref?: React.RefSetter>, - ...props: PressableProps -); -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Pressable/useAndroidRippleForView.js 1`] = ` -"type NativeBackgroundProp = $ReadOnly<{ - type: \\"RippleAndroid\\", - color: ?number, - borderless: boolean, - rippleRadius: ?number, -}>; -export type PressableAndroidRippleConfig = { - color?: ColorValue, - borderless?: boolean, - radius?: number, - foreground?: boolean, -}; -declare export default function useAndroidRippleForView( - rippleConfig: ?PressableAndroidRippleConfig, - viewRef: { current: null | React.ElementRef } -): ?$ReadOnly<{ - onPressIn: (event: GestureResponderEvent) => void, - onPressMove: (event: GestureResponderEvent) => void, - onPressOut: (event: GestureResponderEvent) => void, - viewProps: - | $ReadOnly<{ nativeBackgroundAndroid: NativeBackgroundProp }> - | $ReadOnly<{ nativeForegroundAndroid: NativeBackgroundProp }>, -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js 1`] = ` -"export type { ProgressBarAndroidProps }; -type Omit = T extends any ? Pick, K>> : T; -declare let ProgressBarAndroid: component( - ref?: React.RefSetter< - React.ElementRef, - >, - ...props: Omit -); -declare export default typeof ProgressBarAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js 1`] = ` -"type DeterminateProgressBarAndroidStyleAttrProp = { - styleAttr: \\"Horizontal\\", - indeterminate: false, - progress: number, -}; -type IndeterminateProgressBarAndroidStyleAttrProp = { - styleAttr: - | \\"Horizontal\\" - | \\"Normal\\" - | \\"Small\\" - | \\"Large\\" - | \\"Inverse\\" - | \\"SmallInverse\\" - | \\"LargeInverse\\", - indeterminate: true, -}; -type ProgressBarAndroidBaseProps = $ReadOnly<{ - animating?: ?boolean, - color?: ?ColorValue, - testID?: ?string, -}>; -export type ProgressBarAndroidProps = - | $ReadOnly<{ - ...ViewProps, - ...ProgressBarAndroidBaseProps, - ...DeterminateProgressBarAndroidStyleAttrProp, - }> - | $ReadOnly<{ - ...ViewProps, - ...ProgressBarAndroidBaseProps, - ...IndeterminateProgressBarAndroidStyleAttrProp, - }>; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent\\"; -declare export default typeof PullToRefreshViewNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/RefreshControl/RefreshControl.js 1`] = ` -"export type RefreshControlPropsIOS = $ReadOnly<{ - tintColor?: ?ColorValue, - titleColor?: ?ColorValue, - title?: ?string, -}>; -export type RefreshControlPropsAndroid = $ReadOnly<{ - enabled?: ?boolean, - colors?: ?$ReadOnlyArray, - progressBackgroundColor?: ?ColorValue, - size?: ?(\\"default\\" | \\"large\\"), -}>; -type RefreshControlBaseProps = $ReadOnly<{ - onRefresh?: ?() => void | Promise, - refreshing: boolean, - progressViewOffset?: ?number, -}>; -export type RefreshControlProps = $ReadOnly<{ - ...ViewProps, - ...RefreshControlPropsIOS, - ...RefreshControlPropsAndroid, - ...RefreshControlBaseProps, -}>; -declare class RefreshControl extends React.Component { - componentDidMount(): void; - componentDidUpdate(prevProps: RefreshControlProps): void; - render(): React.Node; -} -declare export default typeof RefreshControl; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/SafeAreaView/SafeAreaView.js 1`] = ` -"declare const SafeAreaView: component( - ref?: React.RefSetter>, - ...props: ViewProps -); -declare export default typeof SafeAreaView; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js 1`] = ` -"declare export const __INTERNAL_VIEW_CONFIG: PartialViewConfig; -declare const AndroidHorizontalScrollViewNativeComponent: HostComponent; -declare export default typeof AndroidHorizontalScrollViewNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js 1`] = ` -"declare export const __INTERNAL_VIEW_CONFIG: PartialViewConfig; -declare const ScrollContentViewNativeComponent: HostComponent; -declare export default typeof ScrollContentViewNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/ScrollView.js 1`] = ` -"export interface ScrollViewScrollToOptions { - x?: number; - y?: number; - animated?: boolean; -} -export interface ScrollViewImperativeMethods { - +getScrollResponder: () => ScrollResponderType; - +getScrollableNode: () => ?number; - +getInnerViewNode: () => ?number; - +getInnerViewRef: () => InnerViewInstance | null; - +getNativeScrollRef: () => HostInstance | null; - +scrollTo: ( - options?: ScrollViewScrollToOptions | number, - deprecatedX?: number, - deprecatedAnimated?: boolean - ) => void; - +scrollToEnd: (options?: ?ScrollViewScrollToOptions) => void; - +flashScrollIndicators: () => void; - +scrollResponderZoomTo: ( - rect: { - x: number, - y: number, - width: number, - height: number, - animated?: boolean, - }, - animated?: boolean - ) => void; - +scrollResponderScrollNativeHandleToKeyboard: ( - nodeHandle: number | HostInstance, - additionalOffset?: number, - preventNegativeScrollOffset?: boolean - ) => void; -} -export type DecelerationRateType = \\"fast\\" | \\"normal\\" | number; -export type ScrollResponderType = ScrollViewImperativeMethods; -export interface PublicScrollViewInstance - extends HostInstance, - ScrollViewImperativeMethods {} -type InnerViewInstance = React.ElementRef; -export type ScrollViewPropsIOS = $ReadOnly<{ - automaticallyAdjustContentInsets?: ?boolean, - automaticallyAdjustKeyboardInsets?: ?boolean, - automaticallyAdjustsScrollIndicatorInsets?: ?boolean, - contentInset?: ?EdgeInsetsProp, - bounces?: ?boolean, - disableScrollViewPanResponder?: ?boolean, - bouncesZoom?: ?boolean, - alwaysBounceHorizontal?: ?boolean, - alwaysBounceVertical?: ?boolean, - centerContent?: ?boolean, - indicatorStyle?: ?(\\"default\\" | \\"black\\" | \\"white\\"), - directionalLockEnabled?: ?boolean, - canCancelContentTouches?: ?boolean, - maximumZoomScale?: ?number, - minimumZoomScale?: ?number, - pinchGestureEnabled?: ?boolean, - scrollIndicatorInsets?: ?EdgeInsetsProp, - scrollToOverflowEnabled?: ?boolean, - scrollsToTop?: ?boolean, - onScrollToTop?: (event: ScrollEvent) => void, - showsHorizontalScrollIndicator?: ?boolean, - zoomScale?: ?number, - contentInsetAdjustmentBehavior?: ?( - | \\"automatic\\" - | \\"scrollableAxes\\" - | \\"never\\" - | \\"always\\" - ), -}>; -export type ScrollViewPropsAndroid = $ReadOnly<{ - nestedScrollEnabled?: ?boolean, - endFillColor?: ?ColorValue, - scrollPerfTag?: ?string, - overScrollMode?: ?(\\"auto\\" | \\"always\\" | \\"never\\"), - persistentScrollbar?: ?boolean, - fadingEdgeLength?: ?number | { start: number, end: number }, -}>; -type StickyHeaderComponentType = component( - ref?: React.RefSetter< - $ReadOnly void }>, - >, - ...ScrollViewStickyHeaderProps -); -type ScrollViewBaseProps = $ReadOnly<{ - contentContainerStyle?: ?ViewStyleProp, - contentOffset?: ?PointProp, - disableIntervalMomentum?: ?boolean, - decelerationRate?: ?DecelerationRateType, - experimental_endDraggingSensitivityMultiplier?: ?number, - horizontal?: ?boolean, - invertStickyHeaders?: ?boolean, - keyboardDismissMode?: ?(\\"none\\" | \\"on-drag\\" | \\"interactive\\"), - keyboardShouldPersistTaps?: ?(\\"always\\" | \\"never\\" | \\"handled\\" | true | false), - maintainVisibleContentPosition?: ?$ReadOnly<{ - minIndexForVisible: number, - autoscrollToTopThreshold?: ?number, - }>, - onMomentumScrollBegin?: ?(event: ScrollEvent) => void, - onMomentumScrollEnd?: ?(event: ScrollEvent) => void, - onScroll?: ?(event: ScrollEvent) => void, - onScrollBeginDrag?: ?(event: ScrollEvent) => void, - onScrollEndDrag?: ?(event: ScrollEvent) => void, - onContentSizeChange?: (contentWidth: number, contentHeight: number) => void, - onKeyboardDidShow?: (event: KeyboardEvent) => void, - onKeyboardDidHide?: (event: KeyboardEvent) => void, - onKeyboardWillShow?: (event: KeyboardEvent) => void, - onKeyboardWillHide?: (event: KeyboardEvent) => void, - pagingEnabled?: ?boolean, - scrollEnabled?: ?boolean, - scrollEventThrottle?: ?number, - showsVerticalScrollIndicator?: ?boolean, - stickyHeaderHiddenOnScroll?: ?boolean, - stickyHeaderIndices?: ?$ReadOnlyArray, - StickyHeaderComponent?: StickyHeaderComponentType, - snapToAlignment?: ?(\\"start\\" | \\"center\\" | \\"end\\"), - snapToInterval?: ?number, - snapToOffsets?: ?$ReadOnlyArray, - snapToStart?: ?boolean, - snapToEnd?: ?boolean, - removeClippedSubviews?: ?boolean, - refreshControl?: ?React.MixedElement, - children?: React.Node, - innerViewRef?: React.RefSetter, - scrollViewRef?: React.RefSetter, -}>; -export type ScrollViewProps = $ReadOnly<{ - ...ViewProps, - ...ScrollViewPropsIOS, - ...ScrollViewPropsAndroid, - ...ScrollViewBaseProps, -}>; -export type ScrollViewComponentStatics = $ReadOnly<{ - Context: typeof ScrollViewContext, -}>; -declare const ScrollViewWrapper: component( - ref?: React.RefSetter, - ...props: ScrollViewProps -); -declare export default typeof ScrollViewWrapper & ScrollViewComponentStatics; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/ScrollViewCommands.js 1`] = ` -"type ScrollViewNativeComponentType = HostComponent<{ ... }>; -interface NativeCommands { - +flashScrollIndicators: ( - viewRef: React.ElementRef - ) => void; - +scrollTo: ( - viewRef: React.ElementRef, - x: Double, - y: Double, - animated: boolean - ) => void; - +scrollToEnd: ( - viewRef: React.ElementRef, - animated: boolean - ) => void; - +zoomToRect: ( - viewRef: React.ElementRef, - rect: { - x: Double, - y: Double, - width: Double, - height: Double, - animated?: boolean, - }, - animated?: boolean - ) => void; -} -declare export default NativeCommands; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/ScrollViewContext.js 1`] = ` -"type Value = { horizontal: boolean } | null; -declare const ScrollViewContext: React.Context; -declare export default typeof ScrollViewContext; -declare export const HORIZONTAL: Value; -declare export const VERTICAL: Value; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/ScrollViewNativeComponent.js 1`] = ` -"declare export const __INTERNAL_VIEW_CONFIG: PartialViewConfig; -declare const ScrollViewNativeComponent: HostComponent; -declare export default typeof ScrollViewNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/ScrollViewNativeComponentType.js 1`] = ` -"export type ScrollViewNativeProps = $ReadOnly<{ - ...ViewProps, - alwaysBounceHorizontal?: ?boolean, - alwaysBounceVertical?: ?boolean, - automaticallyAdjustContentInsets?: ?boolean, - automaticallyAdjustKeyboardInsets?: ?boolean, - automaticallyAdjustsScrollIndicatorInsets?: ?boolean, - bounces?: ?boolean, - bouncesZoom?: ?boolean, - canCancelContentTouches?: ?boolean, - centerContent?: ?boolean, - contentInset?: ?EdgeInsetsProp, - contentInsetAdjustmentBehavior?: ?( - | \\"automatic\\" - | \\"scrollableAxes\\" - | \\"never\\" - | \\"always\\" - ), - contentOffset?: ?PointProp, - decelerationRate?: ?(\\"fast\\" | \\"normal\\" | number), - directionalLockEnabled?: ?boolean, - disableIntervalMomentum?: ?boolean, - endFillColor?: ?ColorValue, - fadingEdgeLength?: ?number | { start: number, end: number }, - indicatorStyle?: ?(\\"default\\" | \\"black\\" | \\"white\\"), - isInvertedVirtualizedList?: ?boolean, - keyboardDismissMode?: ?(\\"none\\" | \\"on-drag\\" | \\"interactive\\"), - maintainVisibleContentPosition?: ?$ReadOnly<{ - minIndexForVisible: number, - autoscrollToTopThreshold?: ?number, - }>, - maximumZoomScale?: ?number, - minimumZoomScale?: ?number, - nestedScrollEnabled?: ?boolean, - onMomentumScrollBegin?: ?(event: ScrollEvent) => void, - onMomentumScrollEnd?: ?(event: ScrollEvent) => void, - onScroll?: ?(event: ScrollEvent) => void, - onScrollBeginDrag?: ?(event: ScrollEvent) => void, - onScrollEndDrag?: ?(event: ScrollEvent) => void, - onScrollToTop?: (event: ScrollEvent) => void, - overScrollMode?: ?(\\"auto\\" | \\"always\\" | \\"never\\"), - pagingEnabled?: ?boolean, - persistentScrollbar?: ?boolean, - pinchGestureEnabled?: ?boolean, - scrollEnabled?: ?boolean, - scrollEventThrottle?: ?number, - scrollIndicatorInsets?: ?EdgeInsetsProp, - scrollPerfTag?: ?string, - scrollToOverflowEnabled?: ?boolean, - scrollsToTop?: ?boolean, - sendMomentumEvents?: ?boolean, - showsHorizontalScrollIndicator?: ?boolean, - showsVerticalScrollIndicator?: ?boolean, - snapToAlignment?: ?(\\"start\\" | \\"center\\" | \\"end\\"), - snapToEnd?: ?boolean, - snapToInterval?: ?number, - snapToOffsets?: ?$ReadOnlyArray, - snapToStart?: ?boolean, - zoomScale?: ?number, - onResponderGrant?: ?(e: GestureResponderEvent) => void | boolean, - ... -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/ScrollViewStickyHeader.js 1`] = ` -"export type ScrollViewStickyHeaderProps = $ReadOnly<{ - children?: React.Node, - nextHeaderLayoutY: ?number, - onLayout: (event: LayoutChangeEvent) => void, - scrollAnimatedValue: Animated.Value, - inverted: ?boolean, - scrollViewHeight: ?number, - nativeID?: ?string, - hiddenOnScroll?: ?boolean, -}>; -interface Instance extends React.ElementRef { - +setNextHeaderY: (number) => void; -} -declare const ScrollViewStickyHeader: component( - ref: React.RefSetter, - ...props: ScrollViewStickyHeaderProps -); -declare export default typeof ScrollViewStickyHeader; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ScrollView/processDecelerationRate.js 1`] = ` -"declare function processDecelerationRate( - decelerationRate: number | \\"normal\\" | \\"fast\\" -): number; -declare export default typeof processDecelerationRate; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Sound/NativeSoundManager.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeSoundManager\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/modules/NativeSoundManager\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Sound/SoundManager.js 1`] = ` -"declare const SoundManager: { playTouchSound: () => void }; -declare export default typeof SoundManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/StaticRenderer.js 1`] = ` -"type Props = $ReadOnly<{ - shouldUpdate: boolean, - render: () => React.Node, -}>; -declare class StaticRenderer extends React.Component { - shouldComponentUpdate(nextProps: Props): boolean; - render(): React.Node; -} -declare export default typeof StaticRenderer; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeStatusBarManagerAndroid\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/modules/NativeStatusBarManagerAndroid\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeStatusBarManagerIOS\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/modules/NativeStatusBarManagerIOS\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/StatusBar/StatusBar.js 1`] = ` -"export type StatusBarStyle = $Keys<{ - default: string, - \\"light-content\\": string, - \\"dark-content\\": string, - ... -}>; -export type StatusBarAnimation = $Keys<{ - none: string, - fade: string, - slide: string, - ... -}>; -export type StatusBarPropsAndroid = $ReadOnly<{ - backgroundColor?: ?ColorValue, - translucent?: ?boolean, -}>; -export type StatusBarPropsIOS = $ReadOnly<{ - networkActivityIndicatorVisible?: ?boolean, - showHideTransition?: ?(\\"fade\\" | \\"slide\\" | \\"none\\"), -}>; -type StatusBarBaseProps = $ReadOnly<{ - hidden?: ?boolean, - animated?: ?boolean, - barStyle?: ?(\\"default\\" | \\"light-content\\" | \\"dark-content\\"), -}>; -export type StatusBarProps = $ReadOnly<{ - ...StatusBarPropsAndroid, - ...StatusBarPropsIOS, - ...StatusBarBaseProps, -}>; -type StackProps = { - backgroundColor: ?{ - value: StatusBarProps[\\"backgroundColor\\"], - animated: boolean, - }, - barStyle: ?{ - value: StatusBarProps[\\"barStyle\\"], - animated: boolean, - }, - translucent: StatusBarProps[\\"translucent\\"], - hidden: ?{ - value: boolean, - animated: boolean, - transition: StatusBarProps[\\"showHideTransition\\"], - }, - networkActivityIndicatorVisible: StatusBarProps[\\"networkActivityIndicatorVisible\\"], -}; -declare class StatusBar extends React.Component { - static currentHeight: ?number; - static setHidden(hidden: boolean, animation?: StatusBarAnimation): void; - static setBarStyle(style: StatusBarStyle, animated?: boolean): void; - static setNetworkActivityIndicatorVisible(visible: boolean): void; - static setBackgroundColor(color: ColorValue, animated?: boolean): void; - static setTranslucent(translucent: boolean): void; - static pushStackEntry(props: StatusBarProps): StackProps; - static popStackEntry(entry: StackProps): void; - static replaceStackEntry( - entry: StackProps, - props: StatusBarProps - ): StackProps; - componentDidMount(): void; - componentWillUnmount(): void; - componentDidUpdate(): void; - render(): React.Node; -} -declare export default typeof StatusBar; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Switch/AndroidSwitchNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Switch/Switch.js 1`] = ` -"export type SwitchPropsIOS = { - onTintColor?: ?ColorValue, - thumbTintColor?: ?ColorValue, - tintColor?: ?ColorValue, -}; -type SwitchChangeEventData = $ReadOnly<{ - target: number, - value: boolean, -}>; -export type SwitchChangeEvent = NativeSyntheticEvent; -type SwitchPropsBase = { - disabled?: ?boolean, - value?: ?boolean, - thumbColor?: ?ColorValue, - trackColor?: ?$ReadOnly<{ - false?: ?ColorValue, - true?: ?ColorValue, - }>, - ios_backgroundColor?: ?ColorValue, - onChange?: ?(event: SwitchChangeEvent) => Promise | void, - onValueChange?: ?(value: boolean) => Promise | void, -}; -export type SwitchProps = $ReadOnly<{ - ...ViewProps, - ...SwitchPropsIOS, - ...SwitchPropsBase, -}>; -type SwitchRef = React.ElementRef< - typeof SwitchNativeComponent | typeof AndroidSwitchNativeComponent, ->; -declare const Switch: component( - ref?: React.RefSetter, - ...props: SwitchProps -); -declare export default typeof Switch; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Switch/SwitchNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/SwitchNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/SwitchNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/AndroidTextInputNativeComponent.js 1`] = ` -"export type KeyboardType = - | \\"default\\" - | \\"email-address\\" - | \\"numeric\\" - | \\"phone-pad\\" - | \\"number-pad\\" - | \\"decimal-pad\\" - | \\"url\\" - | \\"ascii-capable\\" - | \\"numbers-and-punctuation\\" - | \\"name-phone-pad\\" - | \\"twitter\\" - | \\"web-search\\" - | \\"visible-password\\"; -export type ReturnKeyType = - | \\"done\\" - | \\"go\\" - | \\"next\\" - | \\"search\\" - | \\"send\\" - | \\"none\\" - | \\"previous\\" - | \\"default\\" - | \\"emergency-call\\" - | \\"google\\" - | \\"join\\" - | \\"route\\" - | \\"yahoo\\"; -export type SubmitBehavior = \\"submit\\" | \\"blurAndSubmit\\" | \\"newline\\"; -export type AndroidTextInputNativeProps = $ReadOnly<{ - ...Omit, - autoComplete?: WithDefault< - | \\"birthdate-day\\" - | \\"birthdate-full\\" - | \\"birthdate-month\\" - | \\"birthdate-year\\" - | \\"cc-csc\\" - | \\"cc-exp\\" - | \\"cc-exp-day\\" - | \\"cc-exp-month\\" - | \\"cc-exp-year\\" - | \\"cc-number\\" - | \\"email\\" - | \\"gender\\" - | \\"name\\" - | \\"name-family\\" - | \\"name-given\\" - | \\"name-middle\\" - | \\"name-middle-initial\\" - | \\"name-prefix\\" - | \\"name-suffix\\" - | \\"password\\" - | \\"password-new\\" - | \\"postal-address\\" - | \\"postal-address-country\\" - | \\"postal-address-extended\\" - | \\"postal-address-extended-postal-code\\" - | \\"postal-address-locality\\" - | \\"postal-address-region\\" - | \\"postal-code\\" - | \\"street-address\\" - | \\"sms-otp\\" - | \\"tel\\" - | \\"tel-country-code\\" - | \\"tel-national\\" - | \\"tel-device\\" - | \\"username\\" - | \\"username-new\\" - | \\"off\\", - \\"off\\", - >, - returnKeyLabel?: ?string, - numberOfLines?: ?Int32, - disableFullscreenUI?: ?boolean, - textBreakStrategy?: WithDefault< - \\"simple\\" | \\"highQuality\\" | \\"balanced\\", - \\"simple\\", - >, - underlineColorAndroid?: ?ColorValue, - inlineImageLeft?: ?string, - inlineImagePadding?: ?Int32, - importantForAutofill?: string, - showSoftInputOnFocus?: ?boolean, - autoCapitalize?: WithDefault< - \\"none\\" | \\"sentences\\" | \\"words\\" | \\"characters\\", - \\"none\\", - >, - autoCorrect?: ?boolean, - autoFocus?: ?boolean, - allowFontScaling?: ?boolean, - maxFontSizeMultiplier?: ?Float, - editable?: ?boolean, - keyboardType?: WithDefault, - returnKeyType?: WithDefault, - maxLength?: ?Int32, - multiline?: ?boolean, - onBlur?: ?BubblingEventHandler<$ReadOnly<{ target: Int32 }>>, - onFocus?: ?BubblingEventHandler<$ReadOnly<{ target: Int32 }>>, - onChange?: ?BubblingEventHandler< - $ReadOnly<{ target: Int32, eventCount: Int32, text: string }>, - >, - onChangeText?: ?BubblingEventHandler< - $ReadOnly<{ target: Int32, eventCount: Int32, text: string }>, - >, - onContentSizeChange?: ?DirectEventHandler< - $ReadOnly<{ - target: Int32, - contentSize: $ReadOnly<{ width: Double, height: Double }>, - }>, - >, - onEndEditing?: ?BubblingEventHandler< - $ReadOnly<{ target: Int32, text: string }>, - >, - onSelectionChange?: ?DirectEventHandler< - $ReadOnly<{ - target: Int32, - selection: $ReadOnly<{ start: Double, end: Double }>, - }>, - >, - onSubmitEditing?: ?BubblingEventHandler< - $ReadOnly<{ target: Int32, text: string }>, - >, - onKeyPress?: ?BubblingEventHandler<$ReadOnly<{ target: Int32, key: string }>>, - onScroll?: ?DirectEventHandler< - $ReadOnly<{ - target: Int32, - responderIgnoreScroll: boolean, - contentInset: $ReadOnly<{ - top: Double, - bottom: Double, - left: Double, - right: Double, - }>, - contentOffset: $ReadOnly<{ - x: Double, - y: Double, - }>, - contentSize: $ReadOnly<{ - width: Double, - height: Double, - }>, - layoutMeasurement: $ReadOnly<{ - width: Double, - height: Double, - }>, - velocity: $ReadOnly<{ - x: Double, - y: Double, - }>, - }>, - >, - placeholder?: ?Stringish, - placeholderTextColor?: ?ColorValue, - secureTextEntry?: ?boolean, - selectionColor?: ?ColorValue, - selectionHandleColor?: ?ColorValue, - selection?: ?$ReadOnly<{ - start: Int32, - end?: ?Int32, - }>, - value?: ?string, - defaultValue?: ?string, - selectTextOnFocus?: ?boolean, - blurOnSubmit?: ?boolean, - submitBehavior?: ?SubmitBehavior, - style?: ?TextStyleProp, - caretHidden?: ?boolean, - contextMenuHidden?: ?boolean, - textShadowColor?: ?ColorValue, - textShadowRadius?: ?Float, - textDecorationLine?: ?string, - fontStyle?: ?string, - textShadowOffset?: ?$ReadOnly<{ width?: ?Double, height?: ?Double }>, - lineHeight?: ?Float, - textTransform?: ?string, - color?: ?Int32, - letterSpacing?: ?Float, - fontSize?: ?Float, - textAlign?: ?string, - includeFontPadding?: ?boolean, - fontWeight?: ?string, - fontFamily?: ?string, - textAlignVertical?: ?string, - cursorColor?: ?ColorValue, - mostRecentEventCount: Int32, - text?: ?string, -}>; -type NativeType = HostComponent; -type NativeCommands = TextInputNativeCommands; -declare export const Commands: NativeCommands; -declare export const __INTERNAL_VIEW_CONFIG: PartialViewConfig; -declare export default HostComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/InputAccessoryView.js 1`] = ` -"export type InputAccessoryViewProps = $ReadOnly<{ - +children: React.Node, - nativeID?: ?string, - style?: ?ViewStyleProp, - backgroundColor?: ?ColorValue, -}>; -declare const InputAccessoryView: React.ComponentType; -declare export default typeof InputAccessoryView; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js 1`] = ` -"type NativeType = HostComponent<{ ... }>; -type NativeCommands = TextInputNativeCommands; -declare export const Commands: NativeCommands; -declare export const __INTERNAL_VIEW_CONFIG: PartialViewConfig; -declare export default HostComponent<{ ... }>; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js 1`] = ` -"type NativeType = HostComponent<{ ... }>; -type NativeCommands = TextInputNativeCommands; -declare export const Commands: NativeCommands; -declare export const __INTERNAL_VIEW_CONFIG: PartialViewConfig; -declare export default HostComponent<{ ... }>; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/RCTTextInputViewConfig.js 1`] = ` -"type PartialViewConfigWithoutName = Omit; -declare export default PartialViewConfigWithoutName; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/TextInput.flow.js 1`] = ` -"type TextInputChangeEventData = $ReadOnly<{ - eventCount: number, - target: number, - text: string, -}>; -export type TextInputChangeEvent = - NativeSyntheticEvent; -export type TextInputEvent = NativeSyntheticEvent< - $ReadOnly<{ - eventCount: number, - previousText: string, - range: $ReadOnly<{ - start: number, - end: number, - }>, - target: number, - text: string, - }>, ->; -type TextInputContentSizeChangeEventData = $ReadOnly<{ - target: number, - contentSize: $ReadOnly<{ - width: number, - height: number, - }>, -}>; -export type TextInputContentSizeChangeEvent = - NativeSyntheticEvent; -export type TextInputBlurEvent = BlurEvent; -export type TextInputFocusEvent = FocusEvent; -type TargetEvent = $ReadOnly<{ - target: number, - ... -}>; -export type Selection = $ReadOnly<{ - start: number, - end: number, -}>; -type TextInputSelectionChangeEventData = $ReadOnly<{ - ...TargetEvent, - selection: Selection, - ... -}>; -export type TextInputSelectionChangeEvent = - NativeSyntheticEvent; -type TextInputKeyPressEventData = $ReadOnly<{ - ...TargetEvent, - key: string, - target?: ?number, - eventCount: number, - ... -}>; -export type TextInputKeyPressEvent = - NativeSyntheticEvent; -type TextInputEndEditingEventData = $ReadOnly<{ - ...TargetEvent, - eventCount: number, - text: string, - ... -}>; -export type TextInputEndEditingEvent = - NativeSyntheticEvent; -type TextInputSubmitEditingEventData = $ReadOnly<{ - ...TargetEvent, - eventCount: number, - text: string, - ... -}>; -export type TextInputSubmitEditingEvent = - NativeSyntheticEvent; -export type TextInputEditingEvent = - NativeSyntheticEvent; -type DataDetectorTypesType = - | \\"phoneNumber\\" - | \\"link\\" - | \\"address\\" - | \\"calendarEvent\\" - | \\"trackingNumber\\" - | \\"flightNumber\\" - | \\"lookupSuggestion\\" - | \\"none\\" - | \\"all\\"; -export type KeyboardType = - | \\"default\\" - | \\"email-address\\" - | \\"numeric\\" - | \\"phone-pad\\" - | \\"number-pad\\" - | \\"decimal-pad\\" - | \\"url\\"; -export type KeyboardTypeIOS = - | \\"ascii-capable\\" - | \\"numbers-and-punctuation\\" - | \\"name-phone-pad\\" - | \\"twitter\\" - | \\"web-search\\" - | \\"ascii-capable-number-pad\\"; -export type KeyboardTypeAndroid = \\"visible-password\\"; -export type KeyboardTypeOptions = - | KeyboardType - | KeyboardTypeIOS - | KeyboardTypeAndroid; -export type InputModeOptions = - | \\"none\\" - | \\"text\\" - | \\"decimal\\" - | \\"numeric\\" - | \\"tel\\" - | \\"search\\" - | \\"email\\" - | \\"url\\"; -export type ReturnKeyType = \\"done\\" | \\"go\\" | \\"next\\" | \\"search\\" | \\"send\\"; -export type ReturnKeyTypeIOS = - | \\"default\\" - | \\"emergency-call\\" - | \\"google\\" - | \\"join\\" - | \\"route\\" - | \\"yahoo\\"; -export type ReturnKeyTypeAndroid = \\"none\\" | \\"previous\\"; -export type ReturnKeyTypeOptions = - | ReturnKeyType - | ReturnKeyTypeIOS - | ReturnKeyTypeAndroid; -export type SubmitBehavior = \\"submit\\" | \\"blurAndSubmit\\" | \\"newline\\"; -export type AutoCapitalize = \\"none\\" | \\"sentences\\" | \\"words\\" | \\"characters\\"; -export type TextContentType = - | \\"none\\" - | \\"URL\\" - | \\"addressCity\\" - | \\"addressCityAndState\\" - | \\"addressState\\" - | \\"countryName\\" - | \\"creditCardNumber\\" - | \\"creditCardExpiration\\" - | \\"creditCardExpirationMonth\\" - | \\"creditCardExpirationYear\\" - | \\"creditCardSecurityCode\\" - | \\"creditCardType\\" - | \\"creditCardName\\" - | \\"creditCardGivenName\\" - | \\"creditCardMiddleName\\" - | \\"creditCardFamilyName\\" - | \\"emailAddress\\" - | \\"familyName\\" - | \\"fullStreetAddress\\" - | \\"givenName\\" - | \\"jobTitle\\" - | \\"location\\" - | \\"middleName\\" - | \\"name\\" - | \\"namePrefix\\" - | \\"nameSuffix\\" - | \\"nickname\\" - | \\"organizationName\\" - | \\"postalCode\\" - | \\"streetAddressLine1\\" - | \\"streetAddressLine2\\" - | \\"sublocality\\" - | \\"telephoneNumber\\" - | \\"username\\" - | \\"password\\" - | \\"newPassword\\" - | \\"oneTimeCode\\" - | \\"birthdate\\" - | \\"birthdateDay\\" - | \\"birthdateMonth\\" - | \\"birthdateYear\\" - | \\"cellularEID\\" - | \\"cellularIMEI\\" - | \\"dateTime\\" - | \\"flightNumber\\" - | \\"shipmentTrackingNumber\\"; -export type EnterKeyHintTypeAndroid = \\"previous\\"; -export type EnterKeyHintTypeIOS = \\"enter\\"; -export type EnterKeyHintType = \\"done\\" | \\"go\\" | \\"next\\" | \\"search\\" | \\"send\\"; -export type EnterKeyHintTypeOptions = - | EnterKeyHintType - | EnterKeyHintTypeAndroid - | EnterKeyHintTypeIOS; -type PasswordRules = string; -export type TextInputIOSProps = $ReadOnly<{ - disableKeyboardShortcuts?: ?boolean, - clearButtonMode?: ?(\\"never\\" | \\"while-editing\\" | \\"unless-editing\\" | \\"always\\"), - clearTextOnFocus?: ?boolean, - dataDetectorTypes?: - | ?DataDetectorTypesType - | $ReadOnlyArray, - enablesReturnKeyAutomatically?: ?boolean, - inputAccessoryViewID?: ?string, - inputAccessoryViewButtonLabel?: ?string, - keyboardAppearance?: ?(\\"default\\" | \\"light\\" | \\"dark\\"), - passwordRules?: ?PasswordRules, - rejectResponderTermination?: ?boolean, - scrollEnabled?: ?boolean, - spellCheck?: ?boolean, - textContentType?: ?TextContentType, - lineBreakStrategyIOS?: ?(\\"none\\" | \\"standard\\" | \\"hangul-word\\" | \\"push-out\\"), - lineBreakModeIOS?: ?( - | \\"wordWrapping\\" - | \\"char\\" - | \\"clip\\" - | \\"head\\" - | \\"middle\\" - | \\"tail\\" - ), - smartInsertDelete?: ?boolean, -}>; -export type TextInputAndroidProps = $ReadOnly<{ - cursorColor?: ?ColorValue, - selectionHandleColor?: ?ColorValue, - disableFullscreenUI?: ?boolean, - importantForAutofill?: ?( - | \\"auto\\" - | \\"no\\" - | \\"noExcludeDescendants\\" - | \\"yes\\" - | \\"yesExcludeDescendants\\" - ), - inlineImageLeft?: ?string, - inlineImagePadding?: ?number, - numberOfLines?: ?number, - returnKeyLabel?: ?string, - rows?: ?number, - showSoftInputOnFocus?: ?boolean, - textBreakStrategy?: ?(\\"simple\\" | \\"highQuality\\" | \\"balanced\\"), - underlineColorAndroid?: ?ColorValue, -}>; -type TextInputBaseProps = $ReadOnly<{ - experimental_acceptDragAndDropTypes?: ?$ReadOnlyArray, - autoCapitalize?: ?AutoCapitalize, - autoComplete?: ?( - | \\"additional-name\\" - | \\"address-line1\\" - | \\"address-line2\\" - | \\"birthdate-day\\" - | \\"birthdate-full\\" - | \\"birthdate-month\\" - | \\"birthdate-year\\" - | \\"cc-csc\\" - | \\"cc-exp\\" - | \\"cc-exp-day\\" - | \\"cc-exp-month\\" - | \\"cc-exp-year\\" - | \\"cc-number\\" - | \\"cc-name\\" - | \\"cc-given-name\\" - | \\"cc-middle-name\\" - | \\"cc-family-name\\" - | \\"cc-type\\" - | \\"country\\" - | \\"current-password\\" - | \\"email\\" - | \\"family-name\\" - | \\"gender\\" - | \\"given-name\\" - | \\"honorific-prefix\\" - | \\"honorific-suffix\\" - | \\"name\\" - | \\"name-family\\" - | \\"name-given\\" - | \\"name-middle\\" - | \\"name-middle-initial\\" - | \\"name-prefix\\" - | \\"name-suffix\\" - | \\"new-password\\" - | \\"nickname\\" - | \\"one-time-code\\" - | \\"organization\\" - | \\"organization-title\\" - | \\"password\\" - | \\"password-new\\" - | \\"postal-address\\" - | \\"postal-address-country\\" - | \\"postal-address-extended\\" - | \\"postal-address-extended-postal-code\\" - | \\"postal-address-locality\\" - | \\"postal-address-region\\" - | \\"postal-code\\" - | \\"street-address\\" - | \\"sms-otp\\" - | \\"tel\\" - | \\"tel-country-code\\" - | \\"tel-national\\" - | \\"tel-device\\" - | \\"url\\" - | \\"username\\" - | \\"username-new\\" - | \\"off\\" - ), - autoCorrect?: ?boolean, - autoFocus?: ?boolean, - allowFontScaling?: ?boolean, - caretHidden?: ?boolean, - contextMenuHidden?: ?boolean, - defaultValue?: ?Stringish, - editable?: ?boolean, - forwardedRef?: ?React.RefSetter, - enterKeyHint?: ?EnterKeyHintTypeOptions, - inputMode?: ?InputModeOptions, - keyboardType?: ?KeyboardTypeOptions, - maxFontSizeMultiplier?: ?number, - maxLength?: ?number, - multiline?: ?boolean, - onBlur?: ?(e: TextInputBlurEvent) => mixed, - onChange?: ?(e: TextInputChangeEvent) => mixed, - onChangeText?: ?(text: string) => mixed, - onContentSizeChange?: ?(e: TextInputContentSizeChangeEvent) => mixed, - onEndEditing?: ?(e: TextInputEndEditingEvent) => mixed, - onFocus?: ?(e: TextInputFocusEvent) => mixed, - onKeyPress?: ?(e: TextInputKeyPressEvent) => mixed, - onPress?: ?(event: GestureResponderEvent) => mixed, - onPressIn?: ?(event: GestureResponderEvent) => mixed, - onPressOut?: ?(event: GestureResponderEvent) => mixed, - onSelectionChange?: ?(e: TextInputSelectionChangeEvent) => mixed, - onSubmitEditing?: ?(e: TextInputSubmitEditingEvent) => mixed, - onScroll?: ?(e: ScrollEvent) => mixed, - placeholder?: ?Stringish, - placeholderTextColor?: ?ColorValue, - readOnly?: ?boolean, - returnKeyType?: ?ReturnKeyTypeOptions, - secureTextEntry?: ?boolean, - selection?: ?$ReadOnly<{ - start: number, - end?: ?number, - }>, - selectionColor?: ?ColorValue, - selectTextOnFocus?: ?boolean, - blurOnSubmit?: ?boolean, - submitBehavior?: ?SubmitBehavior, - style?: ?TextStyleProp, - value?: ?Stringish, - textAlign?: ?(\\"left\\" | \\"center\\" | \\"right\\"), -}>; -export type TextInputProps = $ReadOnly<{ - ...Omit, - ...TextInputIOSProps, - ...TextInputAndroidProps, - ...TextInputBaseProps, -}>; -export interface TextInputInstance extends HostInstance { - +clear: () => void; - +isFocused: () => boolean; - +getNativeRef: () => ?HostInstance; - +setSelection: (start: number, end: number) => void; -} -type InternalTextInput = component( - ref?: React.RefSetter, - ...TextInputProps -); -export type TextInputComponentStatics = $ReadOnly<{ - State: $ReadOnly<{ - currentlyFocusedInput: () => ?HostInstance, - currentlyFocusedField: () => ?number, - focusTextInput: (textField: ?HostInstance) => void, - blurTextInput: (textField: ?HostInstance) => void, - }>, -}>; -export type TextInputType = InternalTextInput & TextInputComponentStatics; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/TextInput.js 1`] = ` -"export type { - AutoCapitalize, - BlurEvent, - EnterKeyHintType, - EnterKeyHintTypeAndroid, - EnterKeyHintTypeIOS, - EnterKeyHintTypeOptions, - FocusEvent, - InputModeOptions, - KeyboardType, - KeyboardTypeAndroid, - KeyboardTypeIOS, - KeyboardTypeOptions, - ReturnKeyType, - ReturnKeyTypeAndroid, - ReturnKeyTypeIOS, - ReturnKeyTypeOptions, - SubmitBehavior, - TextContentType, - TextInputAndroidProps, - TextInputBlurEvent, - TextInputChangeEvent, - TextInputContentSizeChangeEvent, - TextInputEditingEvent, - TextInputEndEditingEvent, - TextInputEvent, - TextInputFocusEvent, - TextInputIOSProps, - TextInputKeyPressEvent, - TextInputProps, - TextInputSelectionChangeEvent, - TextInputSubmitEditingEvent, -}; -type TextInputStateType = $ReadOnly<{ - currentlyFocusedField: () => ?number, - currentlyFocusedInput: () => ?HostInstance, - focusTextInput: (textField: ?HostInstance) => void, - blurTextInput: (textField: ?HostInstance) => void, -}>; -export type TextInputComponentStatics = $ReadOnly<{ - State: TextInputStateType, -}>; -declare export default TextInputType; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/TextInputNativeCommands.js 1`] = ` -"export interface TextInputNativeCommands { - +focus: (viewRef: React.ElementRef) => void; - +blur: (viewRef: React.ElementRef) => void; - +setTextAndSelection: ( - viewRef: React.ElementRef, - mostRecentEventCount: Int32, - value: ?string, - start: Int32, - end: Int32 - ) => void; -} -declare const supportedCommands: string[]; -declare export default typeof supportedCommands; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/TextInput/TextInputState.js 1`] = ` -"declare function currentlyFocusedInput(): ?HostInstance; -declare function currentlyFocusedField(): ?number; -declare function focusInput(textField: ?HostInstance): void; -declare function blurInput(textField: ?HostInstance): void; -declare function focusField(textFieldID: ?number): void; -declare function blurField(textFieldID: ?number): void; -declare function focusTextInput(textField: ?HostInstance): void; -declare function blurTextInput(textField: ?HostInstance): void; -declare function registerInput(textField: HostInstance): void; -declare function unregisterInput(textField: HostInstance): void; -declare function isTextInput(textField: HostInstance): boolean; -declare const TextInputState: { - currentlyFocusedInput: typeof currentlyFocusedInput, - focusInput: typeof focusInput, - blurInput: typeof blurInput, - currentlyFocusedField: typeof currentlyFocusedField, - focusField: typeof focusField, - blurField: typeof blurField, - focusTextInput: typeof focusTextInput, - blurTextInput: typeof blurTextInput, - registerInput: typeof registerInput, - unregisterInput: typeof unregisterInput, - isTextInput: typeof isTextInput, -}; -declare export default typeof TextInputState; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ToastAndroid/NativeToastAndroid.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeToastAndroid\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/modules/NativeToastAndroid\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ToastAndroid/ToastAndroid.js 1`] = ` -"declare export default typeof ToastAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ToastAndroid/ToastAndroid.js.flow 1`] = ` -"declare const ToastAndroid: { - SHORT: number, - LONG: number, - TOP: number, - BOTTOM: number, - CENTER: number, - show: (message: string, duration: number) => void, - showWithGravity: (message: string, duration: number, gravity: number) => void, - showWithGravityAndOffset: ( - message: string, - duration: number, - gravity: number, - xOffset: number, - yOffset: number - ) => void, -}; -declare export default typeof ToastAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/ToastAndroid/ToastAndroidFallback.js 1`] = ` -"declare const ToastAndroid: { - SHORT: number, - LONG: number, - TOP: number, - BOTTOM: number, - CENTER: number, - show: (message: string, duration: number) => void, - showWithGravity: (message: string, duration: number, gravity: number) => void, - showWithGravityAndOffset: ( - message: string, - duration: number, - gravity: number, - xOffset: number, - yOffset: number - ) => void, -}; -declare export default typeof ToastAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Touchable/BoundingDimensions.js 1`] = ` -"declare function BoundingDimensions(width: number, height: number): void; -declare export default typeof BoundingDimensions; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Touchable/PooledClass.js 1`] = ` -"type Pooler = any; -declare const addPoolingTo: ( - CopyConstructor: Class, - pooler: Pooler -) => Class & { - getPooled(...args: $ReadOnlyArray): T, - release(instance: mixed): void, - ... -}; -declare const PooledClass: { - addPoolingTo: typeof addPoolingTo, - oneArgumentPooler: Pooler, - twoArgumentPooler: Pooler, - threeArgumentPooler: Pooler, - fourArgumentPooler: Pooler, -}; -declare export default typeof PooledClass; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Touchable/Position.js 1`] = ` -"declare function Position(left: number, top: number): void; -declare export default typeof Position; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Touchable/Touchable.js 1`] = ` -"declare const States: { - NOT_RESPONDER: \\"NOT_RESPONDER\\", - RESPONDER_INACTIVE_PRESS_IN: \\"RESPONDER_INACTIVE_PRESS_IN\\", - RESPONDER_INACTIVE_PRESS_OUT: \\"RESPONDER_INACTIVE_PRESS_OUT\\", - RESPONDER_ACTIVE_PRESS_IN: \\"RESPONDER_ACTIVE_PRESS_IN\\", - RESPONDER_ACTIVE_PRESS_OUT: \\"RESPONDER_ACTIVE_PRESS_OUT\\", - RESPONDER_ACTIVE_LONG_PRESS_IN: \\"RESPONDER_ACTIVE_LONG_PRESS_IN\\", - RESPONDER_ACTIVE_LONG_PRESS_OUT: \\"RESPONDER_ACTIVE_LONG_PRESS_OUT\\", - ERROR: \\"ERROR\\", -}; -type TouchableState = - | typeof States.NOT_RESPONDER - | typeof States.RESPONDER_INACTIVE_PRESS_IN - | typeof States.RESPONDER_INACTIVE_PRESS_OUT - | typeof States.RESPONDER_ACTIVE_PRESS_IN - | typeof States.RESPONDER_ACTIVE_PRESS_OUT - | typeof States.RESPONDER_ACTIVE_LONG_PRESS_IN - | typeof States.RESPONDER_ACTIVE_LONG_PRESS_OUT - | typeof States.ERROR; -declare const Signals: { - DELAY: \\"DELAY\\", - RESPONDER_GRANT: \\"RESPONDER_GRANT\\", - RESPONDER_RELEASE: \\"RESPONDER_RELEASE\\", - RESPONDER_TERMINATED: \\"RESPONDER_TERMINATED\\", - ENTER_PRESS_RECT: \\"ENTER_PRESS_RECT\\", - LEAVE_PRESS_RECT: \\"LEAVE_PRESS_RECT\\", - LONG_PRESS_DETECTED: \\"LONG_PRESS_DETECTED\\", -}; -type Signal = - | typeof Signals.DELAY - | typeof Signals.RESPONDER_GRANT - | typeof Signals.RESPONDER_RELEASE - | typeof Signals.RESPONDER_TERMINATED - | typeof Signals.ENTER_PRESS_RECT - | typeof Signals.LEAVE_PRESS_RECT - | typeof Signals.LONG_PRESS_DETECTED; -declare const TouchableMixinImpl: { - componentDidMount: () => void, - componentWillUnmount: () => void, - touchableGetInitialState: () => { - touchable: { - touchState: ?TouchableState, - responderID: ?GestureResponderEvent[\\"currentTarget\\"], - }, - }, - touchableHandleResponderTerminationRequest: () => any, - touchableHandleStartShouldSetResponder: () => any, - touchableLongPressCancelsPress: () => boolean, - touchableHandleResponderGrant: (e: GestureResponderEvent) => void, - touchableHandleResponderRelease: (e: GestureResponderEvent) => void, - touchableHandleResponderTerminate: (e: GestureResponderEvent) => void, - touchableHandleResponderMove: (e: GestureResponderEvent) => void, - touchableHandleFocus: (e: FocusEvent) => void, - touchableHandleBlur: (e: BlurEvent) => void, - withoutDefaultFocusAndBlur: { ... }, -}; -declare const TouchableImpl: { - Mixin: typeof TouchableMixinImpl, - renderDebugView: ($$PARAM_0$$: { - color: ColorValue, - hitSlop?: EdgeInsetsProp, - ... - }) => null | React.Node, -}; -declare export default typeof TouchableImpl; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Touchable/TouchableBounce.js 1`] = ` -"type TouchableBounceProps = $ReadOnly<{ - ...React.ElementConfig, - onPressAnimationComplete?: ?() => void, - onPressWithCompletion?: ?(callback: () => void) => void, - releaseBounciness?: ?number, - releaseVelocity?: ?number, - style?: ?ViewStyleProp, - hostRef: React.RefSetter>, -}>; -declare export default component( - ref: React.RefSetter, - ...props: $ReadOnly> -); -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Touchable/TouchableHighlight.js 1`] = ` -"type AndroidProps = $ReadOnly<{ - nextFocusDown?: ?number, - nextFocusForward?: ?number, - nextFocusLeft?: ?number, - nextFocusRight?: ?number, - nextFocusUp?: ?number, -}>; -type IOSProps = $ReadOnly<{ - hasTVPreferredFocus?: ?boolean, -}>; -type TouchableHighlightBaseProps = $ReadOnly<{ - activeOpacity?: ?number, - underlayColor?: ?ColorValue, - style?: ?ViewStyleProp, - onShowUnderlay?: ?() => void, - onHideUnderlay?: ?() => void, - testOnly_pressed?: ?boolean, - hostRef?: React.RefSetter>, -}>; -export type TouchableHighlightProps = $ReadOnly<{ - ...TouchableWithoutFeedbackProps, - ...AndroidProps, - ...IOSProps, - ...TouchableHighlightBaseProps, -}>; -declare const TouchableHighlight: component( - ref?: React.RefSetter>, - ...props: $ReadOnly> -); -declare export default typeof TouchableHighlight; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Touchable/TouchableNativeFeedback.js 1`] = ` -"type TouchableNativeFeedbackTVProps = { - hasTVPreferredFocus?: ?boolean, - nextFocusDown?: ?number, - nextFocusForward?: ?number, - nextFocusLeft?: ?number, - nextFocusRight?: ?number, - nextFocusUp?: ?number, -}; -export type TouchableNativeFeedbackProps = $ReadOnly<{ - ...TouchableWithoutFeedbackProps, - ...TouchableNativeFeedbackTVProps, - background?: ?( - | $ReadOnly<{ - type: \\"ThemeAttrAndroid\\", - attribute: - | \\"selectableItemBackground\\" - | \\"selectableItemBackgroundBorderless\\", - rippleRadius: ?number, - }> - | $ReadOnly<{ - type: \\"RippleAndroid\\", - color: ?number, - borderless: boolean, - rippleRadius: ?number, - }> - ), - useForeground?: ?boolean, -}>; -type TouchableNativeFeedbackState = $ReadOnly<{ - pressability: Pressability, -}>; -declare class TouchableNativeFeedback - extends - React.Component -{ - static SelectableBackground: (rippleRadius?: ?number) => $ReadOnly<{ - attribute: \\"selectableItemBackground\\", - type: \\"ThemeAttrAndroid\\", - rippleRadius: ?number, - }>; - static SelectableBackgroundBorderless: (rippleRadius?: ?number) => $ReadOnly<{ - attribute: \\"selectableItemBackgroundBorderless\\", - type: \\"ThemeAttrAndroid\\", - rippleRadius: ?number, - }>; - static Ripple: ( - color: string, - borderless: boolean, - rippleRadius?: ?number - ) => $ReadOnly<{ - borderless: boolean, - color: ?number, - rippleRadius: ?number, - type: \\"RippleAndroid\\", - }>; - static canUseNativeForeground: () => boolean; - state: TouchableNativeFeedbackState; - render(): React.Node; - componentDidUpdate( - prevProps: TouchableNativeFeedbackProps, - prevState: TouchableNativeFeedbackState - ): void; - componentDidMount(): mixed; - componentWillUnmount(): void; -} -declare export default typeof TouchableNativeFeedback; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Touchable/TouchableOpacity.js 1`] = ` -"export type TouchableOpacityTVProps = $ReadOnly<{ - hasTVPreferredFocus?: ?boolean, - nextFocusDown?: ?number, - nextFocusForward?: ?number, - nextFocusLeft?: ?number, - nextFocusRight?: ?number, - nextFocusUp?: ?number, -}>; -type TouchableOpacityBaseProps = $ReadOnly<{ - activeOpacity?: ?number, - style?: ?Animated.WithAnimatedValue, - hostRef?: ?React.RefSetter>, -}>; -export type TouchableOpacityProps = $ReadOnly<{ - ...TouchableWithoutFeedbackProps, - ...TouchableOpacityTVProps, - ...TouchableOpacityBaseProps, -}>; -declare const Touchable: component( - ref?: React.RefSetter>, - ...props: TouchableOpacityProps -); -declare export default typeof Touchable; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/Touchable/TouchableWithoutFeedback.js 1`] = ` -"export type TouchableWithoutFeedbackPropsIOS = {}; -export type TouchableWithoutFeedbackPropsAndroid = { - touchSoundDisabled?: ?boolean, -}; -export type TouchableWithoutFeedbackProps = $ReadOnly< - { - children?: ?React.Node, - delayLongPress?: ?number, - delayPressIn?: ?number, - delayPressOut?: ?number, - disabled?: ?boolean, - focusable?: ?boolean, - hitSlop?: ?EdgeInsetsOrSizeProp, - id?: string, - importantForAccessibility?: ?( - | \\"auto\\" - | \\"yes\\" - | \\"no\\" - | \\"no-hide-descendants\\" - ), - nativeID?: ?string, - onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed, - onBlur?: ?(event: BlurEvent) => mixed, - onFocus?: ?(event: FocusEvent) => mixed, - onLayout?: ?(event: LayoutChangeEvent) => mixed, - onLongPress?: ?(event: GestureResponderEvent) => mixed, - onPress?: ?(event: GestureResponderEvent) => mixed, - onPressIn?: ?(event: GestureResponderEvent) => mixed, - onPressOut?: ?(event: GestureResponderEvent) => mixed, - pressRetentionOffset?: ?EdgeInsetsOrSizeProp, - rejectResponderTermination?: ?boolean, - testID?: ?string, - style?: ?ViewStyleProp, - } & TouchableWithoutFeedbackPropsAndroid & - TouchableWithoutFeedbackPropsIOS & - AccessibilityProps, ->; -declare export default function TouchableWithoutFeedback( - props: TouchableWithoutFeedbackProps -): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent\\"; -export { default } from \\"../../../src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/UnimplementedViews/UnimplementedView.js 1`] = ` -"type Props = $ReadOnly<{ - style?: ?ViewStyleProp, - children?: React.Node, - ... -}>; -declare class UnimplementedView extends React.Component { - render(): React.Node; -} -declare export default typeof UnimplementedView; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/View/ReactNativeStyleAttributes.js 1`] = ` -"declare const ReactNativeStyleAttributes: { [string]: AnyAttributeType, ... }; -declare export default typeof ReactNativeStyleAttributes; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/View/ReactNativeViewAttributes.js 1`] = ` -"declare const UIView: { - pointerEvents: true, - accessible: true, - accessibilityActions: true, - accessibilityLabel: true, - accessibilityLiveRegion: true, - accessibilityRole: true, - accessibilityState: true, - accessibilityValue: true, - accessibilityHint: true, - accessibilityLanguage: true, - accessibilityShowsLargeContentViewer: true, - accessibilityLargeContentTitle: true, - importantForAccessibility: true, - nativeID: true, - testID: true, - renderToHardwareTextureAndroid: true, - shouldRasterizeIOS: true, - onLayout: true, - onAccessibilityAction: true, - onAccessibilityTap: true, - onMagicTap: true, - onAccessibilityEscape: true, - collapsable: true, - collapsableChildren: true, - needsOffscreenAlphaCompositing: true, - style: typeof ReactNativeStyleAttributes, - role: true, -}; -declare const RCTView: { - ...typeof UIView, - removeClippedSubviews: true, -}; -declare const ReactNativeViewAttributes: { - UIView: typeof UIView, - RCTView: typeof RCTView, -}; -declare export default typeof ReactNativeViewAttributes; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/View/View.js 1`] = ` -"declare export default component View( - ref?: React.RefSetter>, - ...props: ViewProps -); -" -`; - -exports[`public API should not change unintentionally Libraries/Components/View/ViewAccessibility.js 1`] = ` -"export type AccessibilityRole = - | \\"none\\" - | \\"button\\" - | \\"dropdownlist\\" - | \\"togglebutton\\" - | \\"link\\" - | \\"search\\" - | \\"image\\" - | \\"keyboardkey\\" - | \\"text\\" - | \\"adjustable\\" - | \\"imagebutton\\" - | \\"header\\" - | \\"summary\\" - | \\"alert\\" - | \\"checkbox\\" - | \\"combobox\\" - | \\"menu\\" - | \\"menubar\\" - | \\"menuitem\\" - | \\"progressbar\\" - | \\"radio\\" - | \\"radiogroup\\" - | \\"scrollbar\\" - | \\"spinbutton\\" - | \\"switch\\" - | \\"tab\\" - | \\"tabbar\\" - | \\"tablist\\" - | \\"timer\\" - | \\"list\\" - | \\"toolbar\\" - | \\"grid\\" - | \\"pager\\" - | \\"scrollview\\" - | \\"horizontalscrollview\\" - | \\"viewgroup\\" - | \\"webview\\" - | \\"drawerlayout\\" - | \\"slidingdrawer\\" - | \\"iconmenu\\" - | string; -export type Role = - | \\"alert\\" - | \\"alertdialog\\" - | \\"application\\" - | \\"article\\" - | \\"banner\\" - | \\"button\\" - | \\"cell\\" - | \\"checkbox\\" - | \\"columnheader\\" - | \\"combobox\\" - | \\"complementary\\" - | \\"contentinfo\\" - | \\"definition\\" - | \\"dialog\\" - | \\"directory\\" - | \\"document\\" - | \\"feed\\" - | \\"figure\\" - | \\"form\\" - | \\"grid\\" - | \\"group\\" - | \\"heading\\" - | \\"img\\" - | \\"link\\" - | \\"list\\" - | \\"listitem\\" - | \\"log\\" - | \\"main\\" - | \\"marquee\\" - | \\"math\\" - | \\"menu\\" - | \\"menubar\\" - | \\"menuitem\\" - | \\"meter\\" - | \\"navigation\\" - | \\"none\\" - | \\"note\\" - | \\"option\\" - | \\"presentation\\" - | \\"progressbar\\" - | \\"radio\\" - | \\"radiogroup\\" - | \\"region\\" - | \\"row\\" - | \\"rowgroup\\" - | \\"rowheader\\" - | \\"scrollbar\\" - | \\"searchbox\\" - | \\"separator\\" - | \\"slider\\" - | \\"spinbutton\\" - | \\"status\\" - | \\"summary\\" - | \\"switch\\" - | \\"tab\\" - | \\"table\\" - | \\"tablist\\" - | \\"tabpanel\\" - | \\"term\\" - | \\"timer\\" - | \\"toolbar\\" - | \\"tooltip\\" - | \\"tree\\" - | \\"treegrid\\" - | \\"treeitem\\"; -export type AccessibilityActionName = - | \\"activate\\" - | \\"increment\\" - | \\"decrement\\" - | \\"longpress\\" - | \\"magicTap\\" - | \\"escape\\"; -export type AccessibilityActionInfo = $ReadOnly<{ - name: AccessibilityActionName | string, - label?: string, - ... -}>; -export type AccessibilityActionEvent = NativeSyntheticEvent< - $ReadOnly<{ actionName: string, ... }>, ->; -export type AccessibilityState = { - disabled?: ?boolean, - selected?: ?boolean, - checked?: ?boolean | \\"mixed\\", - busy?: ?boolean, - expanded?: ?boolean, - ... -}; -export type AccessibilityValue = $ReadOnly<{ - min?: number, - max?: number, - now?: number, - text?: Stringish, -}>; -export type AccessibilityPropsAndroid = $ReadOnly<{ - accessibilityLabelledBy?: ?string | ?Array, - \\"aria-labelledby\\"?: ?string, - accessibilityLiveRegion?: ?(\\"none\\" | \\"polite\\" | \\"assertive\\"), - \\"aria-live\\"?: ?(\\"polite\\" | \\"assertive\\" | \\"off\\"), - importantForAccessibility?: ?(\\"auto\\" | \\"yes\\" | \\"no\\" | \\"no-hide-descendants\\"), - screenReaderFocusable?: boolean, -}>; -export type AccessibilityPropsIOS = $ReadOnly<{ - accessibilityIgnoresInvertColors?: ?boolean, - accessibilityViewIsModal?: ?boolean, - accessibilityShowsLargeContentViewer?: ?boolean, - accessibilityLargeContentTitle?: ?string, - \\"aria-modal\\"?: ?boolean, - accessibilityElementsHidden?: ?boolean, - accessibilityLanguage?: ?Stringish, - accessibilityRespondsToUserInteraction?: ?boolean, -}>; -export type AccessibilityProps = $ReadOnly<{ - ...AccessibilityPropsAndroid, - ...AccessibilityPropsIOS, - accessible?: ?boolean, - accessibilityLabel?: ?Stringish, - accessibilityHint?: ?Stringish, - \\"aria-label\\"?: ?Stringish, - accessibilityRole?: ?AccessibilityRole, - role?: ?Role, - accessibilityState?: ?AccessibilityState, - accessibilityValue?: ?AccessibilityValue, - \\"aria-valuemax\\"?: ?AccessibilityValue[\\"max\\"], - \\"aria-valuemin\\"?: ?AccessibilityValue[\\"min\\"], - \\"aria-valuenow\\"?: ?AccessibilityValue[\\"now\\"], - \\"aria-valuetext\\"?: ?AccessibilityValue[\\"text\\"], - accessibilityActions?: ?$ReadOnlyArray, - \\"aria-busy\\"?: ?boolean, - \\"aria-checked\\"?: ?boolean | \\"mixed\\", - \\"aria-disabled\\"?: ?boolean, - \\"aria-expanded\\"?: ?boolean, - \\"aria-selected\\"?: ?boolean, - \\"aria-hidden\\"?: ?boolean, -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/View/ViewNativeComponent.js 1`] = ` -"declare const ViewNativeComponent: HostComponent; -interface NativeCommands { - +hotspotUpdate: (viewRef: HostInstance, x: number, y: number) => void; - +setPressed: (viewRef: HostInstance, pressed: boolean) => void; -} -declare export const Commands: NativeCommands; -declare export default typeof ViewNativeComponent; -export type ViewNativeComponentType = HostComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Components/View/ViewPropTypes.js 1`] = ` -"export type ViewLayout = LayoutRectangle; -export type ViewLayoutEvent = LayoutChangeEvent; -type DirectEventProps = $ReadOnly<{ - onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed, - onAccessibilityTap?: ?() => mixed, - onLayout?: ?(event: LayoutChangeEvent) => mixed, - onMagicTap?: ?() => mixed, - onAccessibilityEscape?: ?() => mixed, -}>; -type MouseEventProps = $ReadOnly<{ - onMouseEnter?: ?(event: MouseEvent) => void, - onMouseLeave?: ?(event: MouseEvent) => void, -}>; -type PointerEventProps = $ReadOnly<{ - onClick?: ?(event: PointerEvent) => void, - onClickCapture?: ?(event: PointerEvent) => void, - onPointerEnter?: ?(event: PointerEvent) => void, - onPointerEnterCapture?: ?(event: PointerEvent) => void, - onPointerLeave?: ?(event: PointerEvent) => void, - onPointerLeaveCapture?: ?(event: PointerEvent) => void, - onPointerMove?: ?(event: PointerEvent) => void, - onPointerMoveCapture?: ?(event: PointerEvent) => void, - onPointerCancel?: ?(e: PointerEvent) => void, - onPointerCancelCapture?: ?(e: PointerEvent) => void, - onPointerDown?: ?(e: PointerEvent) => void, - onPointerDownCapture?: ?(e: PointerEvent) => void, - onPointerUp?: ?(e: PointerEvent) => void, - onPointerUpCapture?: ?(e: PointerEvent) => void, - onPointerOver?: ?(e: PointerEvent) => void, - onPointerOverCapture?: ?(e: PointerEvent) => void, - onPointerOut?: ?(e: PointerEvent) => void, - onPointerOutCapture?: ?(e: PointerEvent) => void, - onGotPointerCapture?: ?(e: PointerEvent) => void, - onGotPointerCaptureCapture?: ?(e: PointerEvent) => void, - onLostPointerCapture?: ?(e: PointerEvent) => void, - onLostPointerCaptureCapture?: ?(e: PointerEvent) => void, -}>; -type FocusEventProps = $ReadOnly<{ - onBlur?: ?(event: BlurEvent) => void, - onBlurCapture?: ?(event: BlurEvent) => void, - onFocus?: ?(event: FocusEvent) => void, - onFocusCapture?: ?(event: FocusEvent) => void, -}>; -type TouchEventProps = $ReadOnly<{ - onTouchCancel?: ?(e: GestureResponderEvent) => void, - onTouchCancelCapture?: ?(e: GestureResponderEvent) => void, - onTouchEnd?: ?(e: GestureResponderEvent) => void, - onTouchEndCapture?: ?(e: GestureResponderEvent) => void, - onTouchMove?: ?(e: GestureResponderEvent) => void, - onTouchMoveCapture?: ?(e: GestureResponderEvent) => void, - onTouchStart?: ?(e: GestureResponderEvent) => void, - onTouchStartCapture?: ?(e: GestureResponderEvent) => void, -}>; -export type GestureResponderHandlers = $ReadOnly<{ - onMoveShouldSetResponder?: ?(e: GestureResponderEvent) => boolean, - onMoveShouldSetResponderCapture?: ?(e: GestureResponderEvent) => boolean, - onResponderGrant?: ?(e: GestureResponderEvent) => void | boolean, - onResponderMove?: ?(e: GestureResponderEvent) => void, - onResponderReject?: ?(e: GestureResponderEvent) => void, - onResponderRelease?: ?(e: GestureResponderEvent) => void, - onResponderStart?: ?(e: GestureResponderEvent) => void, - onResponderEnd?: ?(e: GestureResponderEvent) => void, - onResponderTerminate?: ?(e: GestureResponderEvent) => void, - onResponderTerminationRequest?: ?(e: GestureResponderEvent) => boolean, - onStartShouldSetResponder?: ?(e: GestureResponderEvent) => boolean, - onStartShouldSetResponderCapture?: ?(e: GestureResponderEvent) => boolean, -}>; -type AndroidDrawableThemeAttr = $ReadOnly<{ - type: \\"ThemeAttrAndroid\\", - attribute: string, -}>; -type AndroidDrawableRipple = $ReadOnly<{ - type: \\"RippleAndroid\\", - color?: ?number, - borderless?: ?boolean, - rippleRadius?: ?number, -}>; -type AndroidDrawable = AndroidDrawableThemeAttr | AndroidDrawableRipple; -export type ViewPropsAndroid = $ReadOnly<{ - nativeBackgroundAndroid?: ?AndroidDrawable, - nativeForegroundAndroid?: ?AndroidDrawable, - renderToHardwareTextureAndroid?: ?boolean, - hasTVPreferredFocus?: ?boolean, - nextFocusDown?: ?number, - nextFocusForward?: ?number, - nextFocusLeft?: ?number, - nextFocusRight?: ?number, - nextFocusUp?: ?number, - focusable?: ?boolean, - tabIndex?: 0 | -1, - onClick?: ?(event: GestureResponderEvent) => mixed, -}>; -export type TVViewPropsIOS = $ReadOnly<{ - isTVSelectable?: boolean, - hasTVPreferredFocus?: boolean, - tvParallaxShiftDistanceX?: number, - tvParallaxShiftDistanceY?: number, - tvParallaxTiltAngle?: number, - tvParallaxMagnification?: number, -}>; -export type ViewPropsIOS = $ReadOnly<{ - shouldRasterizeIOS?: ?boolean, -}>; -type ViewBaseProps = $ReadOnly<{ - children?: React.Node, - style?: ?ViewStyleProp, - collapsable?: ?boolean, - collapsableChildren?: ?boolean, - id?: string, - testID?: ?string, - nativeID?: ?string, - needsOffscreenAlphaCompositing?: ?boolean, - hitSlop?: ?EdgeInsetsOrSizeProp, - pointerEvents?: ?(\\"auto\\" | \\"box-none\\" | \\"box-only\\" | \\"none\\"), - removeClippedSubviews?: ?boolean, - experimental_accessibilityOrder?: ?Array, -}>; -export type ViewProps = $ReadOnly<{ - ...DirectEventProps, - ...GestureResponderHandlers, - ...MouseEventProps, - ...PointerEventProps, - ...FocusEventProps, - ...TouchEventProps, - ...ViewPropsAndroid, - ...ViewPropsIOS, - ...AccessibilityProps, - ...ViewBaseProps, -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Devtools/getDevServer.js 1`] = ` -"type DevServerInfo = { - url: string, - fullBundleUrl: ?string, - bundleLoadedFromServer: boolean, - ... -}; -declare export default function getDevServer(): DevServerInfo; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Devtools/loadBundleFromServer.js 1`] = ` -"declare export class LoadBundleFromServerError extends Error { - url: string; - isTimeout: boolean; - constructor( - message: string, - url: string, - isTimeout: boolean, - options?: { cause: mixed, ... } - ): void; -} -declare export class LoadBundleFromServerRequestError - extends LoadBundleFromServerError -{ - constructor( - message: string, - url: string, - isTimeout: boolean, - options?: { cause: mixed, ... } - ): void; -} -declare export default function loadBundleFromServer( - bundlePathAndQuery: string -): Promise; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Devtools/openFileInEditor.js 1`] = ` -"declare export default function openFileInEditor( - file: string, - lineNumber: number -): void; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Devtools/openURLInBrowser.js 1`] = ` -"declare export default function openURLInBrowser(url: string): void; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Devtools/parseErrorStack.js 1`] = ` -"declare export default function parseErrorStack( - errorStack?: string -): Array; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Devtools/parseHermesStack.js 1`] = ` -"type HermesStackLocationNative = $ReadOnly<{ - type: \\"NATIVE\\", -}>; -type HermesStackLocationSource = $ReadOnly<{ - type: \\"SOURCE\\", - sourceUrl: string, - line1Based: number, - column1Based: number, -}>; -type HermesStackLocationInternalBytecode = $ReadOnly<{ - type: \\"INTERNAL_BYTECODE\\", - sourceUrl: string, - line1Based: number, - virtualOffset0Based: number, -}>; -type HermesStackLocationBytecode = $ReadOnly<{ - type: \\"BYTECODE\\", - sourceUrl: string, - line1Based: number, - virtualOffset0Based: number, -}>; -type HermesStackLocation = - | HermesStackLocationNative - | HermesStackLocationSource - | HermesStackLocationInternalBytecode - | HermesStackLocationBytecode; -type HermesStackEntryFrame = $ReadOnly<{ - type: \\"FRAME\\", - location: HermesStackLocation, - functionName: string, -}>; -type HermesStackEntrySkipped = $ReadOnly<{ - type: \\"SKIPPED\\", - count: number, -}>; -type HermesStackEntry = HermesStackEntryFrame | HermesStackEntrySkipped; -export type HermesParsedStack = $ReadOnly<{ - message: string, - entries: $ReadOnlyArray, -}>; -declare export default function parseHermesStack( - stack: string -): HermesParsedStack; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Devtools/symbolicateStackTrace.js 1`] = ` -"export type CodeFrame = $ReadOnly<{ - content: string, - location: ?{ - row: number, - column: number, - ... - }, - fileName: string, -}>; -export type SymbolicatedStackTrace = $ReadOnly<{ - stack: Array, - codeFrame: ?CodeFrame, -}>; -declare export default function symbolicateStackTrace( - stack: Array, - extraData?: mixed -): Promise; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/ExceptionsManager.js 1`] = ` -"declare export class SyntheticError extends Error { - name: string; -} -type ExceptionDecorator = (ExceptionData) => ExceptionData; -declare const decoratedExtraDataKey: \\"RN$ErrorExtraDataKey\\"; -declare function unstable_setExceptionDecorator( - exceptionDecorator: ?ExceptionDecorator -): void; -declare function handleException(e: mixed, isFatal: boolean): void; -declare function installConsoleErrorReporter(): void; -declare const ExceptionsManager: { - decoratedExtraDataKey: typeof decoratedExtraDataKey, - handleException: typeof handleException, - installConsoleErrorReporter: typeof installConsoleErrorReporter, - SyntheticError: typeof SyntheticError, - unstable_setExceptionDecorator: typeof unstable_setExceptionDecorator, -}; -declare export default typeof ExceptionsManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/ExtendedError.js 1`] = ` -"export type ExtendedError = Error & - interface { - jsEngine?: string, - preventSymbolication?: boolean, - componentStack?: string, - isComponentError?: boolean, - type?: string, - cause?: { - name: string, - message: string, - stackElements?: $ReadOnlyArray, - stackSymbols?: $ReadOnlyArray, - stackReturnAddresses?: $ReadOnlyArray, - }, - }; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/InitializeCore.js 1`] = `""`; - -exports[`public API should not change unintentionally Libraries/Core/NativeExceptionsManager.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeExceptionsManager\\"; -declare export default typeof NativeExceptionsManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/RawEventEmitter.js 1`] = ` -"export type RawEventEmitterEvent = $ReadOnly<{ - eventName: string, - nativeEvent: { [string]: mixed }, -}>; -type RawEventDefinitions = { - [eventChannel: string]: [RawEventEmitterEvent], -}; -declare const RawEventEmitter: IEventEmitter; -declare export default typeof RawEventEmitter; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/ReactFiberErrorDialog.js 1`] = ` -"export type CapturedError = { - +componentStack: string, - +error: mixed, - +errorBoundary: ?{ ... }, - ... -}; -declare const ReactFiberErrorDialog: { - showErrorDialog($$PARAM_0$$: CapturedError): boolean, -}; -declare export default typeof ReactFiberErrorDialog; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/ReactNativeVersion.js 1`] = ` -"declare export const version: $ReadOnly<{ - major: number, - minor: number, - patch: number, - prerelease: string | null, -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/ReactNativeVersionCheck.js 1`] = ` -"declare export function checkVersions(): void; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeSegmentFetcher\\"; -declare export default typeof NativeSegmentFetcher; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Timers/JSTimers.js 1`] = ` -"export type JSTimerType = - | \\"setTimeout\\" - | \\"setInterval\\" - | \\"requestAnimationFrame\\" - | \\"queueReactNativeMicrotask\\" - | \\"requestIdleCallback\\"; -declare let ExportedJSTimers: { - callIdleCallbacks: (frameTime: number) => any | void, - callReactNativeMicrotasks: () => void, - callTimers: (timersToCall: Array) => any | void, - cancelAnimationFrame: (timerID: number) => void, - cancelIdleCallback: (timerID: number) => void, - clearReactNativeMicrotask: (timerID: number) => void, - clearInterval: (timerID: number) => void, - clearTimeout: (timerID: number) => void, - emitTimeDriftWarning: (warningMessage: string) => any | void, - requestAnimationFrame: (func: any) => any | number, - requestIdleCallback: (func: any, options: ?any) => any | number, - queueReactNativeMicrotask: (func: any, ...args: any) => number, - setInterval: (func: any, duration: number, ...args: any) => number, - setTimeout: (func: any, duration: number, ...args: any) => number, -}; -declare export default typeof ExportedJSTimers; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Timers/NativeTiming.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeTiming\\"; -declare export default typeof NativeTiming; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Timers/immediateShim.js 1`] = ` -"declare export function setImmediate(callback: Function, ...args: any): number; -declare export function clearImmediate(immediateID: number): void; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/Timers/queueMicrotask.js 1`] = ` -"declare export default function queueMicrotask(callback: Function): void; -" -`; - -exports[`public API should not change unintentionally Libraries/Core/checkNativeVersion.js 1`] = `""`; - -exports[`public API should not change unintentionally Libraries/Core/polyfillPromise.js 1`] = `""`; - -exports[`public API should not change unintentionally Libraries/Core/registerCallableModule.js 1`] = ` -"type Module = { ... }; -type RegisterCallableModule = ( - name: string, - moduleOrFactory: Module | ((void) => Module) -) => void; -declare const registerCallableModule: RegisterCallableModule; -declare export default typeof registerCallableModule; -" -`; - -exports[`public API should not change unintentionally Libraries/Debugging/DebuggingOverlay.js 1`] = ` -"type DebuggingOverlayHandle = { - highlightTraceUpdates(updates: $ReadOnlyArray): void, - highlightElements(elements: $ReadOnlyArray): void, - clearElementsHighlight(): void, -}; -declare export default component(ref: React.RefSetter); -" -`; - -exports[`public API should not change unintentionally Libraries/Debugging/DebuggingOverlayNativeComponent.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent\\"; -declare export default typeof DebuggingOverlayNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Debugging/DebuggingOverlayRegistry.js 1`] = ` -"export type DebuggingOverlayRegistrySubscriberProtocol = { - rootViewRef: AppContainerRootViewRef, - debuggingOverlayRef: DebuggingOverlayRef, -}; -declare class DebuggingOverlayRegistry { - constructor(): void; - subscribe(subscriber: DebuggingOverlayRegistrySubscriberProtocol): void; - unsubscribe(subscriber: DebuggingOverlayRegistrySubscriberProtocol): void; -} -declare const debuggingOverlayRegistryInstance: DebuggingOverlayRegistry; -declare export default typeof debuggingOverlayRegistryInstance; -" -`; - -exports[`public API should not change unintentionally Libraries/Debugging/useSubscribeToDebuggingOverlayRegistry.js 1`] = ` -"declare const useSubscribeToDebuggingOverlayRegistry: ( - rootViewRef: AppContainerRootViewRef, - debuggingOverlayRef: DebuggingOverlayRef -) => void; -declare export default typeof useSubscribeToDebuggingOverlayRegistry; -" -`; - -exports[`public API should not change unintentionally Libraries/EventEmitter/NativeEventEmitter.js 1`] = ` -"interface NativeModule { - addListener(eventType: string): void; - removeListeners(count: number): void; -} -type EmitterSubscription = EventSubscription; -export type { EventSubscription, EmitterSubscription }; -export type NativeEventSubscription = EventSubscription; -type UnsafeNativeEventObject = Object; -declare export default class NativeEventEmitter< - TEventToArgsMap: $ReadOnly< - Record>, - > = $ReadOnly>>, -> implements IEventEmitter -{ - constructor(nativeModule?: ?NativeModule): void; - addListener>( - eventType: TEvent, - listener: (...args: TEventToArgsMap[TEvent]) => mixed, - context?: mixed - ): EventSubscription; - emit>( - eventType: TEvent, - ...args: TEventToArgsMap[TEvent] - ): void; - removeAllListeners>(eventType?: ?TEvent): void; - listenerCount>(eventType: TEvent): number; -} -" -`; - -exports[`public API should not change unintentionally Libraries/EventEmitter/RCTDeviceEventEmitter.js 1`] = ` -"type RCTDeviceEventDefinitions = { [name: string]: Array }; -declare export default IEventEmitter; -" -`; - -exports[`public API should not change unintentionally Libraries/EventEmitter/RCTEventEmitter.js 1`] = ` -"declare const RCTEventEmitter: { register(eventEmitter: any): void }; -declare export default typeof RCTEventEmitter; -" -`; - -exports[`public API should not change unintentionally Libraries/EventEmitter/RCTNativeAppEventEmitter.js 1`] = ` -"declare const RCTNativeAppEventEmitter: typeof RCTDeviceEventEmitter; -declare export default typeof RCTNativeAppEventEmitter; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/AssetRegistry.js 1`] = ` -"export { - registerAsset, - getAssetByID, -} from \\"@react-native/assets-registry/registry\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/AssetSourceResolver.js 1`] = ` -"export type ResolvedAssetSource = { - +width: ?number, - +height: ?number, - +uri: string, - +scale: number, -}; -type AssetDestPathResolver = \\"android\\" | \\"generic\\"; -type PackagerAsset = $ReadOnly<{ - fileSystemLocation: string, - httpServerLocation: string, - width: ?number, - height: ?number, - scales: Array, - hash: string, - name: string, - type: string, - resolver?: AssetDestPathResolver, - ... -}>; -declare class AssetSourceResolver { - serverUrl: ?string; - jsbundleUrl: ?string; - asset: PackagerAsset; - constructor( - serverUrl: ?string, - jsbundleUrl: ?string, - asset: PackagerAsset - ): void; - isLoadedFromServer(): boolean; - isLoadedFromFileSystem(): boolean; - defaultAsset(): ResolvedAssetSource; - getAssetUsingResolver(resolver: AssetDestPathResolver): ResolvedAssetSource; - assetServerURL(): ResolvedAssetSource; - scaledAssetPath(): ResolvedAssetSource; - scaledAssetURLNearBundle(): ResolvedAssetSource; - resourceIdentifierWithoutScale(): ResolvedAssetSource; - drawableFolderInBundle(): ResolvedAssetSource; - fromSource(source: string): ResolvedAssetSource; - static pickScale: (scales: Array, deviceScale?: number) => number; -} -declare export default typeof AssetSourceResolver; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/AssetUtils.js 1`] = ` -"declare export function pickScale( - scales: Array, - deviceScale?: number -): number; -declare export function setUrlCacheBreaker(appendage: string): void; -declare export function getUrlCacheBreaker(): string; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/Image.js 1`] = ` -"declare export default typeof Image; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/Image.js.flow 1`] = ` -"export type { - ImageProgressEventIOS, - ImagePropsIOS, - ImagePropsAndroid, - ImageSourcePropType, - ImageLoadEvent, - ImageErrorEvent, - ImagePropsBase, - ImageProps, - ImageBackgroundProps, -} from \\"./ImageProps\\"; -export type { ImageResolvedAssetSource, ImageSize } from \\"./ImageTypes.flow\\"; -declare export default ImageType; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageAnalyticsTagContext.js 1`] = ` -"type ContextType = ?string; -declare const Context: React.Context; -declare export default typeof Context; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageBackground.js 1`] = ` -"export type { ImageBackgroundProps } from \\"./ImageProps\\"; -declare class ImageBackground extends React.Component { - setNativeProps(props: { ... }): void; - render(): React.Node; -} -declare export default typeof ImageBackground; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageInjection.js 1`] = ` -"type ImageComponentDecorator = - ((AbstractImageAndroid) => AbstractImageAndroid) & - ((AbstractImageIOS) => AbstractImageIOS); -declare export function unstable_setImageComponentDecorator( - imageComponentDecorator: ?ImageComponentDecorator -): void; -declare export function unstable_getImageComponentDecorator(): ?ImageComponentDecorator; -type ImageInstance = React.ElementRef; -type ImageAttachedCallback = ( - imageInstance: ImageInstance -) => void | (() => void); -declare export function unstable_registerImageAttachedCallback( - callback: ImageAttachedCallback -): void; -declare export function unstable_unregisterImageAttachedCallback( - callback: ImageAttachedCallback -): void; -declare export function useWrapRefWithImageAttachedCallbacks( - forwardedRef: React.RefSetter -): React.RefSetter; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageProps.js 1`] = ` -"export type ImageSourcePropType = ImageSource; -type ImageProgressEventDataIOS = { - loaded: number, - total: number, -}; -export type ImageProgressEventIOS = NativeSyntheticEvent< - $ReadOnly, ->; -type ImageErrorEventData = { - error: string, -}; -export type ImageErrorEvent = NativeSyntheticEvent< - $ReadOnly, ->; -type ImageLoadEventData = { - source: { - height: number, - width: number, - uri: string, - }, -}; -export type ImageLoadEvent = NativeSyntheticEvent< - $ReadOnly, ->; -export type ImagePropsIOS = $ReadOnly<{ - defaultSource?: ?ImageSource, - onPartialLoad?: ?() => void, - onProgress?: ?(event: ImageProgressEventIOS) => void, -}>; -export type ImagePropsAndroid = $ReadOnly<{ - loadingIndicatorSource?: ?(number | $ReadOnly), - progressiveRenderingEnabled?: ?boolean, - fadeDuration?: ?number, - resizeMethod?: ?(\\"auto\\" | \\"resize\\" | \\"scale\\" | \\"none\\"), - resizeMultiplier?: ?number, -}>; -export type ImagePropsBase = $ReadOnly<{ - ...Omit, - accessible?: ?boolean, - internal_analyticTag?: ?string, - accessibilityLabel?: ?Stringish, - \\"aria-label\\"?: ?Stringish, - \\"aria-labelledby\\"?: ?string, - alt?: ?Stringish, - blurRadius?: ?number, - capInsets?: ?EdgeInsetsProp, - crossOrigin?: ?(\\"anonymous\\" | \\"use-credentials\\"), - height?: number, - width?: number, - onError?: ?(event: ImageErrorEvent) => void, - onLayout?: ?(event: LayoutChangeEvent) => mixed, - onLoad?: ?(event: ImageLoadEvent) => void, - onLoadEnd?: ?() => void, - onLoadStart?: ?() => void, - source?: ?ImageSource, - referrerPolicy?: ?( - | \\"no-referrer\\" - | \\"no-referrer-when-downgrade\\" - | \\"origin\\" - | \\"origin-when-cross-origin\\" - | \\"same-origin\\" - | \\"strict-origin\\" - | \\"strict-origin-when-cross-origin\\" - | \\"unsafe-url\\" - ), - resizeMode?: ?ImageResizeMode, - testID?: ?string, - tintColor?: ColorValue, - src?: ?string, - srcSet?: ?string, - children?: empty, -}>; -export type ImageProps = $ReadOnly<{ - ...ImagePropsIOS, - ...ImagePropsAndroid, - ...ImagePropsBase, - style?: ?ImageStyleProp, -}>; -export type ImageBackgroundProps = $ReadOnly<{ - ...ImageProps, - children?: React.Node, - style?: ?ViewStyleProp, - imageStyle?: ?ImageStyleProp, - imageRef?: React.RefSetter>, -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageResizeMode.js 1`] = ` -"export type ImageResizeMode = - | \\"center\\" - | \\"contain\\" - | \\"cover\\" - | \\"repeat\\" - | \\"stretch\\" - | \\"none\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageSource.js 1`] = ` -"export interface ImageURISource { - +uri?: ?string; - +bundle?: ?string; - +method?: ?string; - +headers?: ?{ [string]: string }; - +body?: ?string; - +cache?: ?(\\"default\\" | \\"reload\\" | \\"force-cache\\" | \\"only-if-cached\\"); - +width?: ?number; - +height?: ?number; - +scale?: ?number; -} -export type ImageRequireSource = number; -export type ImageSource = - | ImageRequireSource - | ImageURISource - | $ReadOnlyArray; -type ImageSourceProperties = { - body?: ?string, - bundle?: ?string, - cache?: ?(\\"default\\" | \\"reload\\" | \\"force-cache\\" | \\"only-if-cached\\"), - headers?: ?{ [string]: string }, - height?: ?number, - method?: ?string, - scale?: ?number, - uri?: ?string, - width?: ?number, - ... -}; -declare export function getImageSourceProperties( - imageSource: ImageURISource -): $ReadOnly; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageSourceUtils.js 1`] = ` -"declare export function getImageSourcesFromImageProps( - imageProps: ImageProps -): ?ResolvedAssetSource | $ReadOnlyArray<{ uri: string, ... }>; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageTypes.flow.js 1`] = ` -"export type ImageSize = { - width: number, - height: number, -}; -export type ImageResolvedAssetSource = ResolvedAssetSource; -type ImageComponentStaticsIOS = $ReadOnly<{ - getSize(uri: string): Promise, - getSize( - uri: string, - success: (width: number, height: number) => void, - failure?: (error: mixed) => void - ): void, - getSizeWithHeaders( - uri: string, - headers: { [string]: string, ... } - ): Promise, - getSizeWithHeaders( - uri: string, - headers: { [string]: string, ... }, - success: (width: number, height: number) => void, - failure?: (error: mixed) => void - ): void, - prefetch(url: string): Promise, - prefetchWithMetadata( - url: string, - queryRootName: string, - rootTag?: ?RootTag - ): Promise, - queryCache( - urls: Array - ): Promise<{ [url: string]: \\"memory\\" | \\"disk\\" | \\"disk/memory\\", ... }>, - resolveAssetSource(source: ImageSource): ?ImageResolvedAssetSource, -}>; -type ImageComponentStaticsAndroid = $ReadOnly<{ - ...ImageComponentStaticsIOS, - abortPrefetch(requestId: number): void, -}>; -export type AbstractImageAndroid = component( - ref?: React.RefSetter< - | React.ElementRef - | React.ElementRef, - >, - ...props: ImagePropsType -); -export type ImageAndroid = AbstractImageAndroid & ImageComponentStaticsAndroid; -export type AbstractImageIOS = component( - ref?: React.RefSetter>, - ...props: ImagePropsType -); -export type ImageIOS = AbstractImageIOS & ImageComponentStaticsIOS; -export type ImageType = ImageIOS | ImageAndroid; -export type { ImageProps } from \\"./ImageProps\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageUtils.js 1`] = ` -"declare export function convertObjectFitToResizeMode( - objectFit: ?string -): ?ImageResizeMode; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/ImageViewNativeComponent.js 1`] = ` -"type ImageHostComponentProps = $ReadOnly<{ - ...ImageProps, - ...ViewProps, - style?: ImageStyleProp | DangerouslyImpreciseStyle, - tintColor?: ColorValue, - shouldNotifyLoadEvents?: boolean, - src?: - | ?ResolvedAssetSource - | ?$ReadOnlyArray>, - headers?: ?{ [string]: string }, - defaultSource?: ?ImageSource | ?string, - loadingIndicatorSrc?: ?string, -}>; -interface NativeCommands { - +setIsVisible_EXPERIMENTAL: ( - viewRef: HostInstance, - isVisible: boolean, - time: number - ) => void; -} -declare export const Commands: NativeCommands; -declare export const __INTERNAL_VIEW_CONFIG: PartialViewConfig; -declare const ImageViewNativeComponent: HostComponent; -declare export default typeof ImageViewNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/NativeImageEditor.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeImageEditor\\"; -declare export default typeof NativeImageEditor; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/NativeImageLoaderAndroid.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeImageLoaderAndroid\\"; -declare export default typeof NativeImageLoaderAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/NativeImageLoaderIOS.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS\\"; -declare export default typeof NativeImageLoaderIOS; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/NativeImageStoreAndroid.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeImageStoreAndroid\\"; -declare export default typeof NativeImageStoreAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/NativeImageStoreIOS.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeImageStoreIOS\\"; -declare export default typeof NativeImageStoreIOS; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/RelativeImageStub.js 1`] = ` -"declare const RelativeImageStub: number; -declare module.exports: typeof RelativeImageStub; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/TextInlineImageNativeComponent.js 1`] = ` -"type RCTTextInlineImageNativeProps = $ReadOnly<{ - ...ViewProps, - resizeMode?: ?ImageResizeMode, - src?: ?$ReadOnlyArray>, - tintColor?: ?ColorValue, - headers?: ?{ [string]: string }, -}>; -declare export const __INTERNAL_VIEW_CONFIG: PartialViewConfig; -declare const TextInlineImage: HostComponent; -declare export default typeof TextInlineImage; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/nativeImageSource.js 1`] = ` -"type NativeImageSourceSpec = $ReadOnly<{ - android?: string, - ios?: string, - default?: string, - height: number, - width: number, -}>; -declare function nativeImageSource(spec: NativeImageSourceSpec): ImageURISource; -declare export default typeof nativeImageSource; -" -`; - -exports[`public API should not change unintentionally Libraries/Image/resolveAssetSource.js 1`] = ` -"declare function resolveAssetSource(source: ?ImageSource): ?ResolvedAssetSource; -declare export default typeof resolveAssetSource; -" -`; - -exports[`public API should not change unintentionally Libraries/Interaction/FrameRateLogger.js 1`] = ` -"declare const FrameRateLogger: { - setGlobalOptions: (options: { debug?: boolean, ... }) => void, - setContext: (context: string) => void, - beginScroll(): void, - endScroll(): void, -}; -declare export default typeof FrameRateLogger; -" -`; - -exports[`public API should not change unintentionally Libraries/Interaction/InteractionManager.js 1`] = ` -"export type { Task, SimpleTask, PromiseTask } from \\"./TaskQueue\\"; -export type Handle = number; -declare const InteractionManagerImpl: { - Events: { - interactionStart: \\"interactionStart\\", - interactionComplete: \\"interactionComplete\\", - }, - runAfterInteractions(task: ?Task): { - then: ( - onFulfill?: ?(void) => ?(Promise | U), - onReject?: ?(error: mixed) => ?(Promise | U) - ) => Promise, - cancel: () => void, - ... - }, - createInteractionHandle(): Handle, - clearInteractionHandle(handle: Handle): void, - addListener: ( - eventType: string, - listener: (...args: any) => mixed, - context: mixed - ) => EventSubscription, - setDeadline(deadline: number): void, -}; -declare const InteractionManager: typeof InteractionManagerImpl; -declare export default typeof InteractionManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Interaction/InteractionManagerStub.js 1`] = ` -"export type Handle = number; -type Task = - | { - name: string, - run: () => void, - } - | { - name: string, - gen: () => Promise, - } - | (() => void); -declare const InteractionManagerStub: { - Events: { - interactionStart: \\"interactionStart\\", - interactionComplete: \\"interactionComplete\\", - }, - runAfterInteractions(task: ?Task): { - then: ( - onFulfill?: ?(void) => ?(Promise | U), - onReject?: ?(error: mixed) => ?(Promise | U) - ) => Promise, - cancel: () => void, - ... - }, - createInteractionHandle(): Handle, - clearInteractionHandle(handle: Handle): void, - addListener(): EventSubscription, - setDeadline(deadline: number): void, -}; -declare export default typeof InteractionManagerStub; -" -`; - -exports[`public API should not change unintentionally Libraries/Interaction/NativeFrameRateLogger.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeFrameRateLogger\\"; -declare export default typeof NativeFrameRateLogger; -" -`; - -exports[`public API should not change unintentionally Libraries/Interaction/PanResponder.js 1`] = ` -"export type PanResponderGestureState = { - stateID: number, - moveX: number, - moveY: number, - x0: number, - y0: number, - dx: number, - dy: number, - vx: number, - vy: number, - numberActiveTouches: number, -}; -type ActiveCallback = ( - event: GestureResponderEvent, - gestureState: PanResponderGestureState -) => boolean; -type PassiveCallback = ( - event: GestureResponderEvent, - gestureState: PanResponderGestureState -) => mixed; -export type GestureResponderHandlerMethods = { - onMoveShouldSetResponder: (event: GestureResponderEvent) => boolean, - onMoveShouldSetResponderCapture: (event: GestureResponderEvent) => boolean, - onResponderEnd: (event: GestureResponderEvent) => void, - onResponderGrant: (event: GestureResponderEvent) => boolean, - onResponderMove: (event: GestureResponderEvent) => void, - onResponderReject: (event: GestureResponderEvent) => void, - onResponderRelease: (event: GestureResponderEvent) => void, - onResponderStart: (event: GestureResponderEvent) => void, - onResponderTerminate: (event: GestureResponderEvent) => void, - onResponderTerminationRequest: (event: GestureResponderEvent) => boolean, - onStartShouldSetResponder: (event: GestureResponderEvent) => boolean, - onStartShouldSetResponderCapture: (event: GestureResponderEvent) => boolean, -}; -export type PanResponderCallbacks = $ReadOnly<{ - onMoveShouldSetPanResponder?: ?ActiveCallback, - onMoveShouldSetPanResponderCapture?: ?ActiveCallback, - onStartShouldSetPanResponder?: ?ActiveCallback, - onStartShouldSetPanResponderCapture?: ?ActiveCallback, - onPanResponderGrant?: ?(PassiveCallback | ActiveCallback), - onPanResponderReject?: ?PassiveCallback, - onPanResponderStart?: ?PassiveCallback, - onPanResponderEnd?: ?PassiveCallback, - onPanResponderRelease?: ?PassiveCallback, - onPanResponderMove?: ?PassiveCallback, - onPanResponderTerminate?: ?PassiveCallback, - onPanResponderTerminationRequest?: ?ActiveCallback, - onShouldBlockNativeResponder?: ?ActiveCallback, -}>; -declare const PanResponder: { - create(config: PanResponderCallbacks): { - getInteractionHandle: () => ?number, - panHandlers: GestureResponderHandlerMethods, - }, -}; -export type PanResponderInstance = ReturnType<(typeof PanResponder)[\\"create\\"]>; -declare export default typeof PanResponder; -" -`; - -exports[`public API should not change unintentionally Libraries/Interaction/TaskQueue.js 1`] = ` -"export type SimpleTask = { - name: string, - run: () => void, -}; -export type PromiseTask = { - name: string, - gen: () => Promise, -}; -export type Task = SimpleTask | PromiseTask | (() => void); -declare class TaskQueue { - constructor($$PARAM_0$$: { onMoreTasks: () => void, ... }): void; - enqueue(task: Task): void; - enqueueTasks(tasks: Array): void; - cancelTasks(tasksToCancel: Array): void; - hasTasksToProcess(): boolean; - processNext(): void; -} -declare export default typeof TaskQueue; -" -`; - -exports[`public API should not change unintentionally Libraries/Interaction/TouchHistoryMath.js 1`] = ` -"declare const TouchHistoryMath: { - centroidDimension: ( - touchHistory: TouchHistoryMath, - touchesChangedAfter: number, - isXAxis: boolean, - ofCurrent: boolean - ) => number, - currentCentroidXOfTouchesChangedAfter: ( - touchHistory: TouchHistoryMath, - touchesChangedAfter: number - ) => number, - currentCentroidYOfTouchesChangedAfter: ( - touchHistory: TouchHistoryMath, - touchesChangedAfter: number - ) => number, - previousCentroidXOfTouchesChangedAfter: ( - touchHistory: TouchHistoryMath, - touchesChangedAfter: number - ) => number, - previousCentroidYOfTouchesChangedAfter: ( - touchHistory: TouchHistoryMath, - touchesChangedAfter: number - ) => number, - currentCentroidX: (touchHistory: TouchHistoryMath) => number, - currentCentroidY: (touchHistory: TouchHistoryMath) => number, - noCentroid: number, -}; -declare export default typeof TouchHistoryMath; -" -`; - -exports[`public API should not change unintentionally Libraries/LayoutAnimation/LayoutAnimation.js 1`] = ` -"export type { - LayoutAnimationType, - LayoutAnimationProperty, - LayoutAnimationAnimationConfig as LayoutAnimationAnim, -} from \\"../Renderer/shims/ReactNativeTypes\\"; -export type { LayoutAnimationConfig } from \\"../Renderer/shims/ReactNativeTypes\\"; -export type LayoutAnimationTypes = $ReadOnly<{ - [type in LayoutAnimationType]: type, -}>; -export type LayoutAnimationProperties = $ReadOnly<{ - [prop in LayoutAnimationProperty]: prop, -}>; -type OnAnimationDidEndCallback = () => void; -type OnAnimationDidFailCallback = () => void; -declare function setLayoutAnimationEnabled(value: boolean): void; -declare function configureNext( - config: LayoutAnimationConfig, - onAnimationDidEnd?: OnAnimationDidEndCallback, - onAnimationDidFail?: OnAnimationDidFailCallback -): void; -declare function createLayoutAnimation( - duration: number, - type?: LayoutAnimationType, - property?: LayoutAnimationProperty -): LayoutAnimationConfig; -declare const Presets: { - easeInEaseOut: LayoutAnimationConfig, - linear: LayoutAnimationConfig, - spring: LayoutAnimationConfig, -}; -declare const LayoutAnimation: { - configureNext: typeof configureNext, - create: typeof createLayoutAnimation, - Types: LayoutAnimationTypes, - Properties: LayoutAnimationProperties, - checkConfig(...args: Array): void, - Presets: typeof Presets, - easeInEaseOut: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void, - linear: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void, - spring: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void, - setEnabled: typeof setLayoutAnimationEnabled, -}; -declare export default typeof LayoutAnimation; -" -`; - -exports[`public API should not change unintentionally Libraries/Linking/Linking.js 1`] = ` -"type LinkingEventDefinitions = { - url: [{ url: string }], -}; -declare class LinkingImpl extends NativeEventEmitter { - constructor(): void; - addEventListener>( - eventType: K, - listener: (...LinkingEventDefinitions[K]) => mixed - ): EventSubscription; - openURL(url: string): Promise; - canOpenURL(url: string): Promise; - openSettings(): Promise; - getInitialURL(): Promise; - sendIntent( - action: string, - extras?: Array<{ - key: string, - value: string | number | boolean, - ... - }> - ): Promise; -} -declare const Linking: LinkingImpl; -declare export default typeof Linking; -" -`; - -exports[`public API should not change unintentionally Libraries/Linking/NativeIntentAndroid.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeIntentAndroid\\"; -declare export default typeof NativeIntentAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Linking/NativeLinkingManager.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeLinkingManager\\"; -declare export default typeof NativeLinkingManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Lists/FillRateHelper.js 1`] = ` -"type FillRateHelperType = typeof VirtualizedLists.FillRateHelper; -declare const FillRateHelper: FillRateHelperType; -export type { FillRateInfo } from \\"@react-native/virtualized-lists\\"; -declare export default typeof FillRateHelper; -" -`; - -exports[`public API should not change unintentionally Libraries/Lists/FlatList.js 1`] = ` -"type RequiredFlatListProps = { - data: ?$ReadOnly<$ArrayLike>, -}; -type OptionalFlatListProps = { - renderItem?: ?ListRenderItem, - columnWrapperStyle?: ViewStyleProp, - extraData?: any, - getItemLayout?: ( - data: ?$ReadOnly<$ArrayLike>, - index: number - ) => { - length: number, - offset: number, - index: number, - ... - }, - horizontal?: ?boolean, - initialNumToRender?: ?number, - initialScrollIndex?: ?number, - inverted?: ?boolean, - keyExtractor?: ?(item: ItemT, index: number) => string, - numColumns?: number, - removeClippedSubviews?: boolean, - fadingEdgeLength?: ?number | { start: number, end: number }, - strictMode?: boolean, -}; -type FlatListBaseProps = { - ...RequiredFlatListProps, - ...OptionalFlatListProps, -}; -export type FlatListProps = { - ...Omit< - VirtualizedListProps, - | \\"data\\" - | \\"getItem\\" - | \\"getItemCount\\" - | \\"getItemLayout\\" - | \\"renderItem\\" - | \\"keyExtractor\\", - >, - ...FlatListBaseProps, - ... -}; -declare class FlatList - extends React.PureComponent> -{ - scrollToEnd(params?: ?{ animated?: ?boolean, ... }): void; - scrollToIndex(params: { - animated?: ?boolean, - index: number, - viewOffset?: number, - viewPosition?: number, - ... - }): void; - scrollToItem(params: { - animated?: ?boolean, - item: ItemT, - viewOffset?: number, - viewPosition?: number, - ... - }): void; - scrollToOffset(params: { animated?: ?boolean, offset: number, ... }): void; - recordInteraction(): void; - flashScrollIndicators(): void; - getScrollResponder(): ?ScrollResponderType; - getNativeScrollRef(): - | ?React.ElementRef - | ?React.ElementRef; - getScrollableNode(): any; - setNativeProps(props: { [string]: mixed, ... }): void; - constructor(props: FlatListProps): void; - componentDidUpdate(prevProps: FlatListProps): void; - render(): React.Node; -} -declare export default typeof FlatList; -" -`; - -exports[`public API should not change unintentionally Libraries/Lists/SectionList.js 1`] = ` -"declare const VirtualizedSectionList: typeof VirtualizedLists.VirtualizedSectionList; -type DefaultSectionT = { - [key: string]: any, -}; -export type SectionBase< - SectionItemT, - SectionT = DefaultSectionT, -> = _SectionBase; -export type { - SectionData as SectionListData, - ScrollToLocationParamsType as SectionListScrollParams, -}; -type RequiredSectionListProps = { - sections: $ReadOnlyArray>, -}; -export type SectionListRenderItemInfo = { - ...ListRenderItemInfo, - section: SectionData, - ... -}; -export type SectionListRenderItem = ( - info: SectionListRenderItemInfo -) => React.Node | null; -type OptionalSectionListProps = { - renderItem?: SectionListRenderItem, - extraData?: any, - initialNumToRender?: ?number, - inverted?: ?boolean, - keyExtractor?: ?(item: ItemT, index: number) => string, - onEndReached?: ?(info: { distanceFromEnd: number, ... }) => void, - removeClippedSubviews?: boolean, -}; -export type SectionListProps = { - ...Omit< - VirtualizedSectionListProps, - \\"getItem\\" | \\"getItemCount\\" | \\"renderItem\\" | \\"keyExtractor\\", - >, - ...RequiredSectionListProps, - ...OptionalSectionListProps, -}; -declare export default class SectionList< - ItemT = any, - SectionT = DefaultSectionT, -> extends React.PureComponent> -{ - props: SectionListProps; - scrollToLocation(params: ScrollToLocationParamsType): void; - recordInteraction(): void; - flashScrollIndicators(): void; - getScrollResponder(): ?ScrollResponderType; - getScrollableNode(): any; - setNativeProps(props: Object): void; - render(): React.Node; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Lists/SectionListModern.js 1`] = ` -"type DefaultSectionT = { - [key: string]: any, -}; -export type SectionBase< - SectionItemT, - SectionT = DefaultSectionT, -> = _SectionBase; -type RequiredProps = { - sections: $ReadOnlyArray>, -}; -type OptionalProps = { - renderItem?: (info: { - item: ItemT, - index: number, - section: SectionData, - separators: { - highlight: () => void, - unhighlight: () => void, - updateProps: (select: \\"leading\\" | \\"trailing\\", newProps: Object) => void, - ... - }, - ... - }) => null | React.MixedElement, - extraData?: any, - initialNumToRender?: ?number, - inverted?: ?boolean, - keyExtractor?: ?(item: ItemT, index: number) => string, - onEndReached?: ?(info: { distanceFromEnd: number, ... }) => void, - removeClippedSubviews?: boolean, -}; -export type Props = $ReadOnly<{ - ...Omit< - VirtualizedSectionListProps, - \\"getItem\\" | \\"getItemCount\\" | \\"renderItem\\" | \\"keyExtractor\\", - >, - ...RequiredProps, - ...OptionalProps, -}>; -declare const SectionList: component( - ref?: React.RefSetter, - ...Props -); -declare export default typeof SectionList; -" -`; - -exports[`public API should not change unintentionally Libraries/Lists/ViewabilityHelper.js 1`] = ` -"export type { - ViewToken, - ViewabilityConfig, - ViewabilityConfigCallbackPair, -} from \\"@react-native/virtualized-lists\\"; -type ViewabilityHelperType = typeof VirtualizedLists.ViewabilityHelper; -declare const ViewabilityHelper: ViewabilityHelperType; -declare export default typeof ViewabilityHelper; -" -`; - -exports[`public API should not change unintentionally Libraries/Lists/VirtualizeUtils.js 1`] = ` -"type KeyExtractorType = typeof VirtualizedLists.keyExtractor; -declare export const keyExtractor: KeyExtractorType; -" -`; - -exports[`public API should not change unintentionally Libraries/Lists/VirtualizedList.js 1`] = ` -"type VirtualizedListType = typeof VirtualizedLists.VirtualizedList; -declare const VirtualizedListComponent: VirtualizedListType; -export type { - ListRenderItemInfo, - ListRenderItem, - Separators, - VirtualizedListProps, -} from \\"@react-native/virtualized-lists\\"; -declare export default typeof VirtualizedListComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Lists/VirtualizedListContext.js 1`] = ` -"type VirtualizedListContextResetterType = - typeof VirtualizedLists.VirtualizedListContextResetter; -declare export const VirtualizedListContextResetter: VirtualizedListContextResetterType; -" -`; - -exports[`public API should not change unintentionally Libraries/Lists/VirtualizedSectionList.js 1`] = ` -"type VirtualizedSectionListType = - typeof VirtualizedLists.VirtualizedSectionList; -declare const VirtualizedSectionList: VirtualizedSectionListType; -export type { - SectionBase, - ScrollToLocationParamsType, - VirtualizedSectionListProps, -} from \\"@react-native/virtualized-lists\\"; -declare export default typeof VirtualizedSectionList; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/Data/LogBoxData.js 1`] = ` -"export type LogBoxLogs = Set; -export type LogData = $ReadOnly<{ - level: LogLevel, - message: Message, - category: Category, - componentStack: ComponentStack, - componentStackType: ComponentStackType | null, - stack?: string, -}>; -export type Observer = ( - $ReadOnly<{ - logs: LogBoxLogs, - isDisabled: boolean, - selectedLogIndex: number, - }> -) => void; -export type IgnorePattern = string | RegExp; -export type Subscription = $ReadOnly<{ - unsubscribe: () => void, -}>; -export type WarningInfo = { - finalFormat: string, - forceDialogImmediately: boolean, - suppressDialog_LEGACY: boolean, - suppressCompletely: boolean, - monitorEvent: string | null, - monitorListVersion: number, - monitorSampleRate: number, -}; -export type WarningFilter = (format: string) => WarningInfo; -type AppInfo = $ReadOnly<{ - appVersion: string, - engine: string, - onPress?: ?() => void, -}>; -declare export function reportLogBoxError( - error: ExtendedError, - componentStack?: string -): void; -declare export function isLogBoxErrorMessage(message: string): boolean; -declare export function isMessageIgnored(message: string): boolean; -declare export function addLog(log: LogData): void; -declare export function addException(error: ExtendedExceptionData): void; -declare export function symbolicateLogNow(log: LogBoxLog): void; -declare export function retrySymbolicateLogNow(log: LogBoxLog): void; -declare export function symbolicateLogLazy(log: LogBoxLog): void; -declare export function clear(): void; -declare export function setSelectedLog(proposedNewIndex: number): void; -declare export function clearWarnings(): void; -declare export function clearErrors(): void; -declare export function dismiss(log: LogBoxLog): void; -declare export function setWarningFilter(filter: WarningFilter): void; -declare export function setAppInfo(info: () => AppInfo): void; -declare export function getAppInfo(): ?AppInfo; -declare export function checkWarningFilter(format: string): WarningInfo; -declare export function getIgnorePatterns(): $ReadOnlyArray; -declare export function addIgnorePatterns( - patterns: $ReadOnlyArray -): void; -declare export function setDisabled(value: boolean): void; -declare export function isDisabled(): boolean; -declare export function observe(observer: Observer): Subscription; -type SubscribedComponent = React.ComponentType< - $ReadOnly<{ - logs: $ReadOnlyArray, - isDisabled: boolean, - selectedLogIndex: number, - }>, ->; -declare export function withSubscription( - WrappedComponent: SubscribedComponent -): React.ComponentType<{}>; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/Data/LogBoxLog.js 1`] = ` -"type SymbolicationStatus = \\"NONE\\" | \\"PENDING\\" | \\"COMPLETE\\" | \\"FAILED\\"; -export type LogLevel = \\"warn\\" | \\"error\\" | \\"fatal\\" | \\"syntax\\"; -export type LogBoxLogData = $ReadOnly<{ - level: LogLevel, - type?: ?string, - message: Message, - stack: Stack, - category: string, - componentStackType?: ComponentStackType, - componentStack: ComponentStack, - codeFrame?: ?CodeFrame, - isComponentError: boolean, - extraData?: mixed, - onNotificationPress?: ?() => void, -}>; -declare class LogBoxLog { - message: Message; - type: ?string; - category: Category; - componentStack: ComponentStack; - componentStackType: ComponentStackType; - stack: Stack; - count: number; - level: LogLevel; - codeFrame: ?CodeFrame; - componentCodeFrame: ?CodeFrame; - isComponentError: boolean; - extraData: mixed | void; - symbolicated: - | $ReadOnly<{ error: null, stack: null, status: \\"NONE\\" }> - | $ReadOnly<{ error: null, stack: null, status: \\"PENDING\\" }> - | $ReadOnly<{ error: null, stack: Stack, status: \\"COMPLETE\\" }> - | $ReadOnly<{ error: Error, stack: null, status: \\"FAILED\\" }>; - symbolicatedComponentStack: - | $ReadOnly<{ error: null, componentStack: null, status: \\"NONE\\" }> - | $ReadOnly<{ error: null, componentStack: null, status: \\"PENDING\\" }> - | $ReadOnly<{ - error: null, - componentStack: ComponentStack, - status: \\"COMPLETE\\", - }> - | $ReadOnly<{ error: Error, componentStack: null, status: \\"FAILED\\" }>; - onNotificationPress: ?() => void; - constructor(data: LogBoxLogData): void; - incrementCount(): void; - getAvailableStack(): Stack; - getAvailableComponentStack(): ComponentStack; - retrySymbolicate(callback?: (status: SymbolicationStatus) => void): void; - symbolicate(callback?: (status: SymbolicationStatus) => void): void; - handleSymbolicate(callback?: (status: SymbolicationStatus) => void): void; - updateStatus( - error: ?Error, - stack: ?Stack, - codeFrame: ?CodeFrame, - callback?: (status: SymbolicationStatus) => void - ): void; - updateComponentStackStatus( - error: ?Error, - componentStack: ?ComponentStack, - codeFrame: ?CodeFrame, - callback?: (status: SymbolicationStatus) => void - ): void; -} -declare export default typeof LogBoxLog; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/Data/LogBoxSymbolication.js 1`] = ` -"export type Stack = Array; -declare export function deleteStack(stack: Stack): void; -declare export function symbolicate( - stack: Stack, - extraData?: mixed -): Promise; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/Data/parseLogBoxLog.js 1`] = ` -"declare export function hasComponentStack(args: $ReadOnlyArray): boolean; -export type ExtendedExceptionData = ExceptionData & { - isComponentError: boolean, - ... -}; -export type Category = string; -export type CodeFrame = $ReadOnly<{ - content: string, - location: ?{ - row: number, - column: number, - ... - }, - fileName: string, - collapse?: boolean, -}>; -export type Message = $ReadOnly<{ - content: string, - substitutions: $ReadOnlyArray< - $ReadOnly<{ - length: number, - offset: number, - }>, - >, -}>; -export type ComponentStack = $ReadOnlyArray; -export type ComponentStackType = \\"legacy\\" | \\"stack\\"; -declare export function parseInterpolation( - args: $ReadOnlyArray -): $ReadOnly<{ - category: Category, - message: Message, -}>; -declare export function parseComponentStack(message: string): { - type: ComponentStackType, - stack: ComponentStack, -}; -declare export function parseLogBoxException( - error: ExtendedExceptionData -): LogBoxLogData; -declare export function withoutANSIColorStyles(message: mixed): mixed; -declare export function parseLogBoxLog(args: $ReadOnlyArray): { - componentStack: ComponentStack, - componentStackType: ComponentStackType, - category: Category, - message: Message, -}; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/LogBox.js 1`] = ` -"export type { LogData, ExtendedExceptionData, IgnorePattern }; -interface ILogBox { - install(): void; - uninstall(): void; - isInstalled(): boolean; - ignoreLogs($ReadOnlyArray): void; - ignoreAllLogs(value?: boolean): void; - clearAllLogs(): void; - addLog(log: LogData): void; - addConsoleLog(level: \\"warn\\" | \\"error\\", ...args: Array): void; - addException(error: ExtendedExceptionData): void; -} -declare export default ILogBox; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/LogBoxInspectorContainer.js 1`] = ` -"type Props = $ReadOnly<{ - logs: $ReadOnlyArray, - selectedLogIndex: number, - isDisabled?: ?boolean, -}>; -declare export class _LogBoxInspectorContainer extends React.Component { - render(): React.Node; -} -declare export default React.ComponentType<{}>; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/LogBoxNotificationContainer.js 1`] = ` -"type Props = $ReadOnly<{ - logs: $ReadOnlyArray, - selectedLogIndex: number, - isDisabled?: ?boolean, -}>; -declare export function _LogBoxNotificationContainer(props: Props): React.Node; -declare export default React.ComponentType<{}>; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/AnsiHighlight.js 1`] = ` -"declare export default function Ansi($$PARAM_0$$: { - text: string, - style: TextStyleProp, - ... -}): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxButton.js 1`] = ` -"type Props = $ReadOnly<{ - id?: string, - backgroundColor: $ReadOnly<{ - default: string, - pressed: string, - }>, - children?: React.Node, - hitSlop?: ?EdgeInsetsProp, - onPress?: ?(event: GestureResponderEvent) => void, - style?: ViewStyleProp, -}>; -declare function LogBoxButton(props: Props): React.Node; -declare export default typeof LogBoxButton; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspector.js 1`] = ` -"type Props = $ReadOnly<{ - onDismiss: () => void, - onChangeSelectedIndex: (index: number) => void, - onMinimize: () => void, - logs: $ReadOnlyArray, - selectedIndex: number, - fatalType?: ?LogLevel, -}>; -declare export default function LogBoxInspector(props: Props): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorBody.js 1`] = ` -"declare export default function LogBoxInspectorBody(props: { - log: LogBoxLog, - onRetry: () => void, -}): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js 1`] = ` -"type Props = $ReadOnly<{ - componentCodeFrame: ?CodeFrame, - codeFrame: ?CodeFrame, -}>; -declare function LogBoxInspectorCodeFrame(props: Props): React.Node; -declare export default typeof LogBoxInspectorCodeFrame; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorFooter.js 1`] = ` -"type Props = $ReadOnly<{ - onDismiss: () => void, - onMinimize: () => void, - level?: ?LogLevel, -}>; -declare export default function LogBoxInspectorFooter(props: Props): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorFooterButton.js 1`] = ` -"type ButtonProps = $ReadOnly<{ - id: string, - onPress: () => void, - text: string, -}>; -declare export default function LogBoxInspectorFooterButton( - props: ButtonProps -): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorHeader.js 1`] = ` -"type Props = $ReadOnly<{ - onSelectIndex: (selectedIndex: number) => void, - selectedIndex: number, - total: number, - level: LogLevel, -}>; -declare export default function LogBoxInspectorHeader(props: Props): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js 1`] = ` -"declare export default function LogBoxInspectorHeaderButton( - props: $ReadOnly<{ - id: string, - disabled: boolean, - image: ImageSource, - level: LogLevel, - onPress?: ?() => void, - }> -): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js 1`] = ` -"type Props = $ReadOnly<{ - collapsed: boolean, - message: Message, - level: LogLevel, - title: string, - onPress: () => void, -}>; -declare function LogBoxInspectorMessageHeader(props: Props): React.Node; -declare export default typeof LogBoxInspectorMessageHeader; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorReactFrames.js 1`] = ` -"type Props = $ReadOnly<{ - log: LogBoxLog, -}>; -declare function LogBoxInspectorReactFrames(props: Props): React.Node; -declare export default typeof LogBoxInspectorReactFrames; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorSection.js 1`] = ` -"type Props = $ReadOnly<{ - heading: string, - children: React.Node, - action?: ?React.Node, -}>; -declare function LogBoxInspectorSection(props: Props): React.Node; -declare export default typeof LogBoxInspectorSection; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js 1`] = ` -"type Props = $ReadOnly<{ - onPress?: ?(event: GestureResponderEvent) => void, - status: \\"COMPLETE\\" | \\"FAILED\\" | \\"NONE\\" | \\"PENDING\\", -}>; -declare function LogBoxInspectorSourceMapStatus(props: Props): React.Node; -declare export default typeof LogBoxInspectorSourceMapStatus; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorStackFrame.js 1`] = ` -"type Props = $ReadOnly<{ - frame: StackFrame, - onPress?: ?(event: GestureResponderEvent) => void, -}>; -declare function LogBoxInspectorStackFrame(props: Props): React.Node; -declare export default typeof LogBoxInspectorStackFrame; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxInspectorStackFrames.js 1`] = ` -"type Props = $ReadOnly<{ - log: LogBoxLog, - onRetry: () => void, -}>; -declare export function getCollapseMessage( - stackFrames: Stack, - collapsed: boolean -): string; -declare function LogBoxInspectorStackFrames(props: Props): React.Node; -declare export default typeof LogBoxInspectorStackFrames; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxMessage.js 1`] = ` -"type Props = { - message: Message, - style: TextStyleProp, - plaintext?: ?boolean, - maxLength?: ?number, - ... -}; -declare function LogBoxMessage(props: Props): React.Node; -declare export default typeof LogBoxMessage; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxNotification.js 1`] = ` -"type Props = $ReadOnly<{ - log: LogBoxLog, - totalLogCount: number, - level: \\"warn\\" | \\"error\\", - onPressOpen: () => void, - onPressDismiss: () => void, -}>; -declare export default function LogBoxNotification(props: Props): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxNotificationCountBadge.js 1`] = ` -"declare export default function LogBoxNotificationCountBadge(props: { - count: number, - level: \\"error\\" | \\"warn\\", -}): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxNotificationDismissButton.js 1`] = ` -"declare export default function LogBoxNotificationDismissButton(props: { - id: string, - onPress: () => void, -}): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxNotificationMessage.js 1`] = ` -"declare export default function LogBoxNotificationMessage(props: { - message: MessageType, -}): React.Node; -" -`; - -exports[`public API should not change unintentionally Libraries/LogBox/UI/LogBoxStyle.js 1`] = ` -"declare export function getBackgroundColor(opacity?: number): string; -declare export function getBackgroundLightColor(opacity?: number): string; -declare export function getBackgroundDarkColor(opacity?: number): string; -declare export function getWarningColor(opacity?: number): string; -declare export function getWarningDarkColor(opacity?: number): string; -declare export function getFatalColor(opacity?: number): string; -declare export function getFatalDarkColor(opacity?: number): string; -declare export function getErrorColor(opacity?: number): string; -declare export function getErrorDarkColor(opacity?: number): string; -declare export function getLogColor(opacity?: number): string; -declare export function getWarningHighlightColor(opacity?: number): string; -declare export function getDividerColor(opacity?: number): string; -declare export function getHighlightColor(opacity?: number): string; -declare export function getTextColor(opacity?: number): string; -" -`; - -exports[`public API should not change unintentionally Libraries/Modal/Modal.js 1`] = ` -"export type PublicModalInstance = HostInstance; -type OrientationChangeEvent = $ReadOnly<{ - orientation: \\"portrait\\" | \\"landscape\\", -}>; -export type ModalBaseProps = { - animated?: boolean, - animationType?: ?(\\"none\\" | \\"slide\\" | \\"fade\\"), - transparent?: ?boolean, - visible?: ?boolean, - onRequestClose?: ?DirectEventHandler, - onShow?: ?DirectEventHandler, - backdropColor?: ColorValue, - modalRef?: React.RefSetter, -}; -export type ModalPropsIOS = { - presentationStyle?: ?( - | \\"fullScreen\\" - | \\"pageSheet\\" - | \\"formSheet\\" - | \\"overFullScreen\\" - ), - supportedOrientations?: ?$ReadOnlyArray< - | \\"portrait\\" - | \\"portrait-upside-down\\" - | \\"landscape\\" - | \\"landscape-left\\" - | \\"landscape-right\\", - >, - onDismiss?: ?() => void, - onOrientationChange?: ?DirectEventHandler, - allowSwipeDismissal?: ?boolean, -}; -export type ModalPropsAndroid = { - hardwareAccelerated?: ?boolean, - statusBarTranslucent?: ?boolean, - navigationBarTranslucent?: ?boolean, -}; -export type ModalProps = { - ...ModalBaseProps, - ...ModalPropsIOS, - ...ModalPropsAndroid, - ...ViewProps, -}; -type ModalRefProps = $ReadOnly<{ - ref?: React.RefSetter, -}>; -declare function Wrapper($$PARAM_0$$: { - ...ModalRefProps, - ...ModalProps, -}): React.Node; -declare export default typeof Wrapper; -" -`; - -exports[`public API should not change unintentionally Libraries/Modal/NativeModalManager.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeModalManager\\"; -declare export default typeof NativeModalManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Modal/RCTModalHostViewNativeComponent.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent\\"; -declare export default typeof RCTModalHostViewNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeComponent/BaseViewConfig.js 1`] = ` -"declare export default typeof BaseViewConfig; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeComponent/BaseViewConfig.js.flow 1`] = ` -"declare const PlatformBaseViewConfig: PartialViewConfigWithoutName; -declare export default typeof PlatformBaseViewConfig; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeComponent/NativeComponentRegistry.js 1`] = ` -"declare export function setRuntimeConfigProvider( - runtimeConfigProvider: (name: string) => ?{ - native: boolean, - verify: boolean, - } -): void; -declare export function get( - name: string, - viewConfigProvider: () => PartialViewConfig -): HostComponent; -declare export function getWithFallback_DEPRECATED( - name: string, - viewConfigProvider: () => PartialViewConfig -): React.ComponentType; -declare export function unstable_hasStaticViewConfig(name: string): boolean; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeComponent/NativeComponentRegistryUnstable.js 1`] = ` -"declare export function unstable_hasComponent(name: string): boolean; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeComponent/PlatformBaseViewConfig.js 1`] = ` -"export type PartialViewConfigWithoutName = Omit< - PartialViewConfig, - \\"uiViewClassName\\", ->; -declare const PlatformBaseViewConfig: PartialViewConfigWithoutName; -declare export default typeof PlatformBaseViewConfig; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeComponent/StaticViewConfigValidator.js 1`] = ` -"export type Difference = - | { - type: \\"missing\\", - path: Array, - nativeValue: mixed, - } - | { - type: \\"unequal\\", - path: Array, - nativeValue: mixed, - staticValue: mixed, - }; -export type ValidationResult = ValidResult | InvalidResult; -type ValidResult = { - type: \\"valid\\", -}; -type InvalidResult = { - type: \\"invalid\\", - differences: Array, -}; -declare export function validate( - name: string, - nativeViewConfig: ViewConfig, - staticViewConfig: ViewConfig -): ValidationResult; -declare export function stringifyValidationResult( - name: string, - validationResult: InvalidResult -): string; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeComponent/ViewConfig.js 1`] = ` -"declare export function createViewConfig( - partialViewConfig: PartialViewConfig -): ViewConfig; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeComponent/ViewConfigIgnore.js 1`] = ` -"declare export function DynamicallyInjectedByGestureHandler( - object: T -): T; -declare export function ConditionallyIgnoredEventHandlers< - const T: { +[name: string]: true }, ->( - value: T -): T | void; -declare export function isIgnored(value: mixed): boolean; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeModules/specs/NativeDevMenu.js 1`] = ` -"export * from \\"../../../src/private/devsupport/devmenu/specs/NativeDevMenu\\"; -declare export default typeof NativeDevMenu; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeModules/specs/NativeDevSettings.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeDevSettings\\"; -declare export default typeof NativeDevSettings; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeModules/specs/NativeDeviceEventManager.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeDeviceEventManager\\"; -declare export default typeof NativeDeviceEventManager; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeModules/specs/NativeDialogManagerAndroid.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid\\"; -declare export default typeof NativeDialogManagerAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeModules/specs/NativeLogBox.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeLogBox\\"; -declare export default typeof NativeLogBox; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeModules/specs/NativeRedBox.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeRedBox\\"; -declare export default typeof NativeRedBox; -" -`; - -exports[`public API should not change unintentionally Libraries/NativeModules/specs/NativeSourceCode.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeSourceCode\\"; -declare export default typeof NativeSourceCode; -" -`; - -exports[`public API should not change unintentionally Libraries/Network/FormData.js 1`] = ` -"type FormDataValue = string | { name?: string, type?: string, uri: string }; -type FormDataNameValuePair = [string, FormDataValue]; -type Headers = { [name: string]: string, ... }; -type FormDataPart = - | { - string: string, - headers: Headers, - ... - } - | { - uri: string, - headers: Headers, - name?: string, - type?: string, - ... - }; -declare class FormData { - constructor(): void; - append(key: string, value: FormDataValue): void; - getAll(key: string): Array; - getParts(): Array; -} -declare export default typeof FormData; -" -`; - -exports[`public API should not change unintentionally Libraries/Network/NativeNetworkingAndroid.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeNetworkingAndroid\\"; -declare export default typeof NativeNetworkingAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Network/NativeNetworkingIOS.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeNetworkingIOS\\"; -declare export default typeof NativeNetworkingIOS; -" -`; - -exports[`public API should not change unintentionally Libraries/Network/RCTNetworking.js 1`] = ` -"declare export default typeof RCTNetworking; -" -`; - -exports[`public API should not change unintentionally Libraries/Network/RCTNetworking.js.flow 1`] = ` -"declare const RCTNetworking: interface { - addListener>( - eventType: K, - listener: (...RCTNetworkingEventDefinitions[K]) => mixed, - context?: mixed - ): EventSubscription, - sendRequest( - method: string, - trackingName: string | void, - url: string, - headers: { ... }, - data: RequestBody, - responseType: NativeResponseType, - incrementalUpdates: boolean, - timeout: number, - callback: (requestId: number) => void, - withCredentials: boolean - ): void, - abortRequest(requestId: number): void, - clearCookies(callback: (result: boolean) => void): void, -}; -declare export default typeof RCTNetworking; -" -`; - -exports[`public API should not change unintentionally Libraries/Network/RCTNetworkingEventDefinitions.flow.js 1`] = ` -"export type RCTNetworkingEventDefinitions = $ReadOnly<{ - didSendNetworkData: [[number, number, number]], - didReceiveNetworkResponse: [[number, number, ?{ [string]: string }, ?string]], - didReceiveNetworkData: [[number, string]], - didReceiveNetworkIncrementalData: [[number, string, number, number]], - didReceiveNetworkDataProgress: [[number, number, number]], - didCompleteNetworkResponse: [[number, string, boolean]], -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/Network/XMLHttpRequest.js 1`] = ` -"export type NativeResponseType = \\"base64\\" | \\"blob\\" | \\"text\\"; -export type ResponseType = - | \\"\\" - | \\"arraybuffer\\" - | \\"blob\\" - | \\"document\\" - | \\"json\\" - | \\"text\\"; -export type Response = ?Object | string; -type XHRInterceptor = interface { - requestSent(id: number, url: string, method: string, headers: Object): void, - responseReceived( - id: number, - url: string, - status: number, - headers: Object - ): void, - dataReceived(id: number, data: string): void, - loadingFinished(id: number, encodedDataLength: number): void, - loadingFailed(id: number, error: string): void, -}; -declare class XMLHttpRequestEventTarget extends EventTarget { - get onload(): EventCallback | null; - set onload(listener: ?EventCallback): void; - get onloadstart(): EventCallback | null; - set onloadstart(listener: ?EventCallback): void; - get onprogress(): EventCallback | null; - set onprogress(listener: ?EventCallback): void; - get ontimeout(): EventCallback | null; - set ontimeout(listener: ?EventCallback): void; - get onerror(): EventCallback | null; - set onerror(listener: ?EventCallback): void; - get onabort(): EventCallback | null; - set onabort(listener: ?EventCallback): void; - get onloadend(): EventCallback | null; - set onloadend(listener: ?EventCallback): void; -} -declare class XMLHttpRequest extends EventTarget { - static UNSENT: number; - static OPENED: number; - static HEADERS_RECEIVED: number; - static LOADING: number; - static DONE: number; - UNSENT: number; - OPENED: number; - HEADERS_RECEIVED: number; - LOADING: number; - DONE: number; - readyState: number; - responseHeaders: ?Object; - status: number; - timeout: number; - responseURL: ?string; - withCredentials: boolean; - upload: XMLHttpRequestEventTarget; - static enableProfiling(enableProfiling: boolean): void; - constructor(): void; - get responseType(): ResponseType; - set responseType(responseType: ResponseType): void; - get responseText(): string; - get response(): Response; - getAllResponseHeaders(): ?string; - getResponseHeader(header: string): ?string; - setRequestHeader(header: string, value: any): void; - setTrackingName(trackingName: ?string): XMLHttpRequest; - setPerformanceLogger(performanceLogger: IPerformanceLogger): XMLHttpRequest; - open(method: string, url: string, async: ?boolean): void; - send(data: any): void; - abort(): void; - setResponseHeaders(responseHeaders: ?Object): void; - setReadyState(newState: number): void; - addEventListener(type: string, listener: EventListener | null): void; - get onabort(): EventCallback | null; - set onabort(listener: ?EventCallback): void; - get onerror(): EventCallback | null; - set onerror(listener: ?EventCallback): void; - get onload(): EventCallback | null; - set onload(listener: ?EventCallback): void; - get onloadstart(): EventCallback | null; - set onloadstart(listener: ?EventCallback): void; - get onprogress(): EventCallback | null; - set onprogress(listener: ?EventCallback): void; - get ontimeout(): EventCallback | null; - set ontimeout(listener: ?EventCallback): void; - get onloadend(): EventCallback | null; - set onloadend(listener: ?EventCallback): void; - get onreadystatechange(): EventCallback | null; - set onreadystatechange(listener: ?EventCallback): void; -} -declare export default typeof XMLHttpRequest; -" -`; - -exports[`public API should not change unintentionally Libraries/Network/convertRequestBody.js 1`] = ` -"export type RequestBody = - | string - | Blob - | FormData - | { uri: string, ... } - | ArrayBuffer - | $ArrayBufferView; -declare function convertRequestBody(body: RequestBody): Object; -declare export default typeof convertRequestBody; -" -`; - -exports[`public API should not change unintentionally Libraries/Network/fetch.js 1`] = ` -"declare export const fetch: typeof global.fetch; -declare export const Headers: typeof global.Headers; -declare export const Request: typeof global.Request; -declare export const Response: typeof global.Response; -" -`; - -exports[`public API should not change unintentionally Libraries/Performance/Systrace.js 1`] = ` -"type EventName = string | (() => string); -type EventArgs = ?{ [string]: string }; -declare export function isEnabled(): boolean; -declare export function setEnabled(_doEnable: boolean): void; -declare export function beginEvent( - eventName: EventName, - args?: EventArgs -): void; -declare export function endEvent(args?: EventArgs): void; -declare export function beginAsyncEvent( - eventName: EventName, - args?: EventArgs -): number; -declare export function endAsyncEvent( - eventName: EventName, - cookie: number, - args?: EventArgs -): void; -declare export function counterEvent(eventName: EventName, value: number): void; -" -`; - -exports[`public API should not change unintentionally Libraries/PermissionsAndroid/NativePermissionsAndroid.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativePermissionsAndroid\\"; -declare export default typeof NativePermissionsAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/PermissionsAndroid/PermissionsAndroid.js 1`] = ` -"export type Rationale = { - title: string, - message: string, - buttonPositive?: string, - buttonNegative?: string, - buttonNeutral?: string, - ... -}; -type PermissionsType = $ReadOnly<{ - READ_CALENDAR: \\"android.permission.READ_CALENDAR\\", - WRITE_CALENDAR: \\"android.permission.WRITE_CALENDAR\\", - CAMERA: \\"android.permission.CAMERA\\", - READ_CONTACTS: \\"android.permission.READ_CONTACTS\\", - WRITE_CONTACTS: \\"android.permission.WRITE_CONTACTS\\", - GET_ACCOUNTS: \\"android.permission.GET_ACCOUNTS\\", - ACCESS_FINE_LOCATION: \\"android.permission.ACCESS_FINE_LOCATION\\", - ACCESS_COARSE_LOCATION: \\"android.permission.ACCESS_COARSE_LOCATION\\", - ACCESS_BACKGROUND_LOCATION: \\"android.permission.ACCESS_BACKGROUND_LOCATION\\", - RECORD_AUDIO: \\"android.permission.RECORD_AUDIO\\", - READ_PHONE_STATE: \\"android.permission.READ_PHONE_STATE\\", - CALL_PHONE: \\"android.permission.CALL_PHONE\\", - READ_CALL_LOG: \\"android.permission.READ_CALL_LOG\\", - WRITE_CALL_LOG: \\"android.permission.WRITE_CALL_LOG\\", - ADD_VOICEMAIL: \\"com.android.voicemail.permission.ADD_VOICEMAIL\\", - READ_VOICEMAIL: \\"com.android.voicemail.permission.READ_VOICEMAIL\\", - WRITE_VOICEMAIL: \\"com.android.voicemail.permission.WRITE_VOICEMAIL\\", - USE_SIP: \\"android.permission.USE_SIP\\", - PROCESS_OUTGOING_CALLS: \\"android.permission.PROCESS_OUTGOING_CALLS\\", - BODY_SENSORS: \\"android.permission.BODY_SENSORS\\", - BODY_SENSORS_BACKGROUND: \\"android.permission.BODY_SENSORS_BACKGROUND\\", - SEND_SMS: \\"android.permission.SEND_SMS\\", - RECEIVE_SMS: \\"android.permission.RECEIVE_SMS\\", - READ_SMS: \\"android.permission.READ_SMS\\", - RECEIVE_WAP_PUSH: \\"android.permission.RECEIVE_WAP_PUSH\\", - RECEIVE_MMS: \\"android.permission.RECEIVE_MMS\\", - READ_EXTERNAL_STORAGE: \\"android.permission.READ_EXTERNAL_STORAGE\\", - READ_MEDIA_IMAGES: \\"android.permission.READ_MEDIA_IMAGES\\", - READ_MEDIA_VIDEO: \\"android.permission.READ_MEDIA_VIDEO\\", - READ_MEDIA_AUDIO: \\"android.permission.READ_MEDIA_AUDIO\\", - READ_MEDIA_VISUAL_USER_SELECTED: \\"android.permission.READ_MEDIA_VISUAL_USER_SELECTED\\", - WRITE_EXTERNAL_STORAGE: \\"android.permission.WRITE_EXTERNAL_STORAGE\\", - BLUETOOTH_CONNECT: \\"android.permission.BLUETOOTH_CONNECT\\", - BLUETOOTH_SCAN: \\"android.permission.BLUETOOTH_SCAN\\", - BLUETOOTH_ADVERTISE: \\"android.permission.BLUETOOTH_ADVERTISE\\", - ACCESS_MEDIA_LOCATION: \\"android.permission.ACCESS_MEDIA_LOCATION\\", - ACCEPT_HANDOVER: \\"android.permission.ACCEPT_HANDOVER\\", - ACTIVITY_RECOGNITION: \\"android.permission.ACTIVITY_RECOGNITION\\", - ANSWER_PHONE_CALLS: \\"android.permission.ANSWER_PHONE_CALLS\\", - READ_PHONE_NUMBERS: \\"android.permission.READ_PHONE_NUMBERS\\", - UWB_RANGING: \\"android.permission.UWB_RANGING\\", - POST_NOTIFICATIONS: \\"android.permission.POST_NOTIFICATIONS\\", - NEARBY_WIFI_DEVICES: \\"android.permission.NEARBY_WIFI_DEVICES\\", -}>; -export type PermissionStatus = \\"granted\\" | \\"denied\\" | \\"never_ask_again\\"; -export type Permission = $Values; -declare class PermissionsAndroidImpl { - PERMISSIONS: PermissionsType; - RESULTS: $ReadOnly<{ - DENIED: \\"denied\\", - GRANTED: \\"granted\\", - NEVER_ASK_AGAIN: \\"never_ask_again\\", - }>; - checkPermission(permission: Permission): Promise; - check(permission: Permission): Promise; - requestPermission( - permission: Permission, - rationale?: Rationale - ): Promise; - request( - permission: Permission, - rationale?: Rationale - ): Promise; - requestMultiple( - permissions: Array - ): Promise<{ [permission: Permission]: PermissionStatus, ... }>; -} -declare const PermissionsAndroidInstance: PermissionsAndroidImpl; -declare export default typeof PermissionsAndroidInstance; -" -`; - -exports[`public API should not change unintentionally Libraries/Pressability/HoverState.js 1`] = ` -"declare export function isHoverEnabled(): boolean; -" -`; - -exports[`public API should not change unintentionally Libraries/Pressability/Pressability.js 1`] = ` -"export type PressabilityConfig = $ReadOnly<{ - cancelable?: ?boolean, - disabled?: ?boolean, - hitSlop?: ?RectOrSize, - pressRectOffset?: ?RectOrSize, - android_disableSound?: ?boolean, - delayHoverIn?: ?number, - delayHoverOut?: ?number, - delayLongPress?: ?number, - delayPressIn?: ?number, - delayPressOut?: ?number, - minPressDuration?: ?number, - onBlur?: ?(event: BlurEvent) => mixed, - onFocus?: ?(event: FocusEvent) => mixed, - onHoverIn?: ?(event: MouseEvent) => mixed, - onHoverOut?: ?(event: MouseEvent) => mixed, - onLongPress?: ?(event: GestureResponderEvent) => mixed, - onPress?: ?(event: GestureResponderEvent) => mixed, - onPressIn?: ?(event: GestureResponderEvent) => mixed, - onPressMove?: ?(event: GestureResponderEvent) => mixed, - onPressOut?: ?(event: GestureResponderEvent) => mixed, - blockNativeResponder?: ?boolean, -}>; -export type EventHandlers = $ReadOnly<{ - onBlur: (event: BlurEvent) => void, - onClick: (event: GestureResponderEvent) => void, - onFocus: (event: FocusEvent) => void, - onMouseEnter?: (event: MouseEvent) => void, - onMouseLeave?: (event: MouseEvent) => void, - onPointerEnter?: (event: PointerEvent) => void, - onPointerLeave?: (event: PointerEvent) => void, - onResponderGrant: (event: GestureResponderEvent) => void | boolean, - onResponderMove: (event: GestureResponderEvent) => void, - onResponderRelease: (event: GestureResponderEvent) => void, - onResponderTerminate: (event: GestureResponderEvent) => void, - onResponderTerminationRequest: () => boolean, - onStartShouldSetResponder: () => boolean, -}>; -type TouchState = - | \\"NOT_RESPONDER\\" - | \\"RESPONDER_INACTIVE_PRESS_IN\\" - | \\"RESPONDER_INACTIVE_PRESS_OUT\\" - | \\"RESPONDER_ACTIVE_PRESS_IN\\" - | \\"RESPONDER_ACTIVE_PRESS_OUT\\" - | \\"RESPONDER_ACTIVE_LONG_PRESS_IN\\" - | \\"RESPONDER_ACTIVE_LONG_PRESS_OUT\\" - | \\"ERROR\\"; -declare export default class Pressability { - constructor(config: PressabilityConfig): void; - configure(config: PressabilityConfig): void; - reset(): void; - getEventHandlers(): EventHandlers; - static setLongPressDeactivationDistance(distance: number): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Pressability/PressabilityDebug.js 1`] = ` -"type Props = $ReadOnly<{ - color: ColorValue, - hitSlop: ?RectOrSize, -}>; -declare export function PressabilityDebugView(props: Props): React.Node; -declare export function isEnabled(): boolean; -declare export function setEnabled(value: boolean): void; -" -`; - -exports[`public API should not change unintentionally Libraries/Pressability/PressabilityPerformanceEventEmitter.js 1`] = ` -"export type PressabilityPerformanceEvent = $ReadOnly<{ - signal: TouchSignal, - nativeTimestamp: number, -}>; -export type PressabilityPerformanceEventListener = - (PressabilityPerformanceEvent) => void; -declare class PressabilityPerformanceEventEmitter { - constructor(): void; - addListener(listener: PressabilityPerformanceEventListener): void; - removeListener(listener: PressabilityPerformanceEventListener): void; - emitEvent(constructEvent: () => PressabilityPerformanceEvent): void; -} -declare const PressabilityPerformanceEventEmitterSingleton: PressabilityPerformanceEventEmitter; -declare export default typeof PressabilityPerformanceEventEmitterSingleton; -" -`; - -exports[`public API should not change unintentionally Libraries/Pressability/PressabilityTypes.js 1`] = ` -"export type PressabilityTouchSignal = - | \\"DELAY\\" - | \\"RESPONDER_GRANT\\" - | \\"RESPONDER_RELEASE\\" - | \\"RESPONDER_TERMINATED\\" - | \\"ENTER_PRESS_RECT\\" - | \\"LEAVE_PRESS_RECT\\" - | \\"LONG_PRESS_DETECTED\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Pressability/usePressability.js 1`] = ` -"declare export default function usePressability( - config: ?PressabilityConfig -): null | EventHandlers; -" -`; - -exports[`public API should not change unintentionally Libraries/Promise.js 1`] = ` -"declare export default typeof Promise; -" -`; - -exports[`public API should not change unintentionally Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativePushNotificationManagerIOS\\"; -declare export default typeof NativePushNotificationManagerIOS; -" -`; - -exports[`public API should not change unintentionally Libraries/PushNotificationIOS/PushNotificationIOS.js 1`] = ` -"export type PushNotificationPermissions = { - alert: boolean, - badge: boolean, - sound: boolean, - [key: string]: boolean | number, -}; -type PresentLocalNotificationDetails = { - alertBody: string, - alertAction?: string, - alertTitle?: string, - soundName?: string, - category?: string, - userInfo?: Object, - applicationIconBadgeNumber?: number, - fireDate?: number, - isSilent?: boolean, -}; -type ScheduleLocalNotificationDetails = { - ...PresentLocalNotificationDetails, - repeatInterval?: \\"year\\" | \\"month\\" | \\"week\\" | \\"day\\" | \\"hour\\" | \\"minute\\", -}; -export type ContentAvailable = 1 | null | void; -export type FetchResult = { - NewData: \\"UIBackgroundFetchResultNewData\\", - NoData: \\"UIBackgroundFetchResultNoData\\", - ResultFailed: \\"UIBackgroundFetchResultFailed\\", - ... -}; -export type PushNotificationEventName = $Keys<{ - notification: string, - localNotification: string, - register: string, - registrationError: string, - ... -}>; -export interface PushNotification { - getMessage(): ?string | ?Object; - getSound(): ?string; - getCategory(): ?string; - getAlert(): ?string | ?Object; - getContentAvailable(): ContentAvailable; - getBadgeCount(): ?number; - getData(): ?Object; - getThreadID(): ?string; - finish(result: string): void; -} -declare class PushNotificationIOS { - static FetchResult: FetchResult; - static presentLocalNotification( - details: PresentLocalNotificationDetails - ): void; - static scheduleLocalNotification( - details: ScheduleLocalNotificationDetails - ): void; - static cancelAllLocalNotifications(): void; - static removeAllDeliveredNotifications(): void; - static getDeliveredNotifications( - callback: (notifications: Array) => void - ): void; - static removeDeliveredNotifications(identifiers: Array): void; - static setApplicationIconBadgeNumber(number: number): void; - static getApplicationIconBadgeNumber(callback: Function): void; - static cancelLocalNotifications(userInfo: Object): void; - static getScheduledLocalNotifications(callback: Function): void; - static addEventListener( - type: PushNotificationEventName, - handler: Function - ): void; - static removeEventListener(type: PushNotificationEventName): void; - static requestPermissions( - permissions?: PushNotificationPermissions - ): Promise<{ - alert: boolean, - badge: boolean, - sound: boolean, - ... - }>; - static abandonPermissions(): void; - static checkPermissions( - callback: (permissions: PushNotificationPermissions) => void - ): void; - static getInitialNotification(): Promise; - static getAuthorizationStatus( - callback: (authorizationStatus: number) => void - ): void; - constructor(nativeNotif: Object): void; - finish(fetchResult: string): void; - getMessage(): ?string | ?Object; - getSound(): ?string; - getCategory(): ?string; - getAlert(): ?string | ?Object; - getContentAvailable(): ContentAvailable; - getBadgeCount(): ?number; - getData(): ?Object; - getThreadID(): ?string; -} -declare export default typeof PushNotificationIOS; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/AppContainer.js 1`] = ` -"export type Props = $ReadOnly<{ - children?: React.Node, - fabric?: boolean, - rootTag: number | RootTag, - initialProps?: { ... }, - WrapperComponent?: ?React.ComponentType, - rootViewStyle?: ?ViewStyleProp, - internal_excludeLogBox?: boolean, - internal_excludeInspector?: boolean, -}>; -declare const AppContainer: component(...Props); -declare export default typeof AppContainer; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/AppContainer-dev.js 1`] = ` -"declare const AppContainer: ($$PARAM_0$$: Props) => React.Node; -export type AppContainerRootViewRef = React.RefObject | null>; -export type InspectedViewRef = React.RefObject | null>; -export type DebuggingOverlayRef = React.RefObject | null>; -declare export default typeof AppContainer; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/AppContainer-prod.js 1`] = ` -"declare const AppContainer: ($$PARAM_0$$: Props) => React.Node; -declare export default typeof AppContainer; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/AppRegistry.flow.js 1`] = ` -"type HeadlessTask = (taskData: any) => Promise; -export type TaskProvider = () => HeadlessTask; -export type ComponentProvider = () => React.ComponentType; -export type ComponentProviderInstrumentationHook = ( - component_: ComponentProvider, - scopedPerformanceLogger: IPerformanceLogger -) => React.ComponentType; -export type AppConfig = { - appKey: string, - component?: ComponentProvider, - run?: Runnable, - section?: boolean, - ... -}; -export type AppParameters = { - initialProps: $ReadOnly<{ [string]: mixed, ... }>, - rootTag: RootTag, - fabric?: boolean, -}; -export type Runnable = ( - appParameters: AppParameters, - displayMode: DisplayModeType -) => void; -export type Runnables = { [appKey: string]: Runnable }; -export type Registry = { - sections: $ReadOnlyArray, - runnables: Runnables, - ... -}; -export type WrapperComponentProvider = ( - appParameters: Object -) => React.ComponentType; -export type RootViewStyleProvider = (appParameters: Object) => ViewStyleProp; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/AppRegistry.js 1`] = ` -"export { AppRegistry }; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/AppRegistry.js.flow 1`] = ` -"export type { - TaskProvider, - ComponentProvider, - ComponentProviderInstrumentationHook, - AppConfig, - Runnable, - Runnables, - Registry, - WrapperComponentProvider, - RootViewStyleProvider, -} from \\"./AppRegistry.flow\\"; -export * as AppRegistry from \\"./AppRegistryImpl\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/AppRegistryImpl.js 1`] = ` -"type TaskCanceller = () => void; -type TaskCancelProvider = () => TaskCanceller; -declare export function setWrapperComponentProvider( - provider: WrapperComponentProvider -): void; -declare export function setRootViewStyleProvider( - provider: RootViewStyleProvider -): void; -declare export function registerConfig(config: Array): void; -declare export function registerComponent( - appKey: string, - componentProvider: ComponentProvider, - section?: boolean -): string; -declare export function registerRunnable(appKey: string, run: Runnable): string; -declare export function registerSection( - appKey: string, - component: ComponentProvider -): void; -declare export function getAppKeys(): $ReadOnlyArray; -declare export function getSectionKeys(): $ReadOnlyArray; -declare export function getSections(): Runnables; -declare export function getRunnable(appKey: string): ?Runnable; -declare export function getRegistry(): Registry; -declare export function setComponentProviderInstrumentationHook( - hook: ComponentProviderInstrumentationHook -): void; -declare export function runApplication( - appKey: string, - appParameters: AppParameters, - displayMode?: number -): void; -declare export function setSurfaceProps( - appKey: string, - appParameters: Object, - displayMode?: number -): void; -declare export function unmountApplicationComponentAtRootTag( - rootTag: RootTag -): void; -declare export function registerHeadlessTask( - taskKey: string, - taskProvider: TaskProvider -): void; -declare export function registerCancellableHeadlessTask( - taskKey: string, - taskProvider: TaskProvider, - taskCancelProvider: TaskCancelProvider -): void; -declare export function startHeadlessTask( - taskId: number, - taskKey: string, - data: any -): void; -declare export function cancelHeadlessTask( - taskId: number, - taskKey: string -): void; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/BridgelessUIManager.js 1`] = ` -"declare const UIManagerJS: UIManagerJSInterface & { [string]: any }; -declare export default typeof UIManagerJS; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/DisplayMode.js 1`] = ` -"declare export opaque type DisplayModeType; -declare const DisplayMode: { +[string]: DisplayModeType }; -declare export function coerceDisplayMode(value: ?number): DisplayModeType; -declare export default typeof DisplayMode; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/FabricUIManager.js 1`] = ` -"export type NodeSet = Array; -export type NodeProps = { ... }; -export interface Spec { - +createNode: ( - reactTag: number, - viewName: string, - rootTag: RootTag, - props: NodeProps, - instanceHandle: InternalInstanceHandle - ) => Node; - +cloneNode: (node: Node) => Node; - +cloneNodeWithNewChildren: (node: Node) => Node; - +cloneNodeWithNewProps: (node: Node, newProps: NodeProps) => Node; - +cloneNodeWithNewChildrenAndProps: (node: Node, newProps: NodeProps) => Node; - +createChildSet: (rootTag: RootTag) => NodeSet; - +appendChild: (parentNode: Node, child: Node) => Node; - +appendChildToSet: (childSet: NodeSet, child: Node) => void; - +completeRoot: (rootTag: RootTag, childSet: NodeSet) => void; - +measure: ( - node: Node | NativeElementReference, - callback: MeasureOnSuccessCallback - ) => void; - +measureInWindow: ( - node: Node | NativeElementReference, - callback: MeasureInWindowOnSuccessCallback - ) => void; - +measureLayout: ( - node: Node | NativeElementReference, - relativeNode: Node | NativeElementReference, - onFail: () => void, - onSuccess: MeasureLayoutOnSuccessCallback - ) => void; - +configureNextLayoutAnimation: ( - config: LayoutAnimationConfig, - callback: () => void, - errorCallback: () => void - ) => void; - +sendAccessibilityEvent: (node: Node, eventType: string) => void; - +findShadowNodeByTag_DEPRECATED: (reactTag: number) => ?Node; - +setNativeProps: ( - node: Node | NativeElementReference, - newProps: NodeProps - ) => void; - +dispatchCommand: ( - node: Node, - commandName: string, - args: Array - ) => void; - +findNodeAtPoint: ( - node: Node, - locationX: number, - locationY: number, - callback: (instanceHandle: ?InternalInstanceHandle) => void - ) => void; - +compareDocumentPosition: ( - node: Node | NativeElementReference, - otherNode: Node | NativeElementReference - ) => number; - +getBoundingClientRect: ( - node: Node | NativeElementReference, - includeTransform: boolean - ) => ?[number, number, number, number]; - +unstable_DefaultEventPriority: number; - +unstable_DiscreteEventPriority: number; - +unstable_ContinuousEventPriority: number; - +unstable_IdleEventPriority: number; - +unstable_getCurrentEventPriority: () => number; -} -declare export function getFabricUIManager(): ?Spec; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/HeadlessJsTaskError.js 1`] = ` -"declare export default class HeadlessJsTaskError extends Error {} -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/I18nManager.js 1`] = ` -"declare export default { - getConstants: () => I18nManagerConstants, - allowRTL: (shouldAllow: boolean) => void, - forceRTL: (shouldForce: boolean) => void, - swapLeftAndRightInRTL: (flipStyles: boolean) => void, - isRTL: I18nManagerConstants[\\"isRTL\\"], - doLeftAndRightSwapInRTL: I18nManagerConstants[\\"doLeftAndRightSwapInRTL\\"], -}; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/NativeHeadlessJsTaskSupport.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeHeadlessJsTaskSupport\\"; -declare export default typeof NativeHeadlessJsTaskSupport; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/NativeI18nManager.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeI18nManager\\"; -declare export default typeof NativeI18nManager; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/NativeUIManager.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeUIManager\\"; -declare export default typeof NativeUIManager; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/PaperUIManager.js 1`] = ` -"declare const UIManagerJS: UIManagerJSInterface; -declare export default typeof UIManagerJS; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js 1`] = ` -"declare export default class ReactFabricHostComponent implements NativeMethods { - constructor( - tag: number, - viewConfig: ViewConfig, - internalInstanceHandle: InternalInstanceHandle - ): void; - blur(): void; - focus(): void; - measure(callback: MeasureOnSuccessCallback): void; - measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; - measureLayout( - relativeToNativeNode: number | HostInstance, - onSuccess: MeasureLayoutOnSuccessCallback, - onFail?: () => void - ): void; - unstable_getBoundingClientRect(): DOMRect; - setNativeProps(nativeProps: { ... }): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js 1`] = ` -"declare export opaque type PublicRootInstance; -declare export function createPublicRootInstance( - rootTag: RootTag -): PublicRootInstance; -declare export function createPublicInstance( - tag: number, - viewConfig: ViewConfig, - internalInstanceHandle: InternalInstanceHandle, - ownerDocument: ReactNativeDocumentT -): ReactFabricHostComponentT | ReactNativeElementT; -declare export function createPublicTextInstance( - internalInstanceHandle: InternalInstanceHandle, - ownerDocument: ReactNativeDocumentT -): ReadOnlyTextT; -declare export function getNativeTagFromPublicInstance( - publicInstance: ReactFabricHostComponentT | ReactNativeElementT -): number; -declare export function getNodeFromPublicInstance( - publicInstance: ReactFabricHostComponentT | ReactNativeElementT -): ?Node; -declare export function getInternalInstanceHandleFromPublicInstance( - publicInstance: ReactFabricHostComponentT | ReactNativeElementT -): InternalInstanceHandle; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js 1`] = ` -"declare export function isPublicInstance(maybeInstance: mixed): boolean; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js 1`] = ` -"declare export function create( - props: Object, - validAttributes: AttributeConfiguration -): null | Object; -declare export function diff( - prevProps: Object, - nextProps: Object, - validAttributes: AttributeConfiguration -): null | Object; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js 1`] = ` -"declare export default function warnForStyleProps( - props: { ... }, - validAttributes: AttributeConfiguration -): void; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/ReactNativeFeatureFlags.js 1`] = ` -"export type FeatureFlags = { - shouldEmitW3CPointerEvents: () => boolean, - shouldPressibilityUseW3CPointerEventsForHover: () => boolean, -}; -declare const ReactNativeFeatureFlags: FeatureFlags; -declare export default typeof ReactNativeFeatureFlags; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js 1`] = ` -"export type RuntimeDiagnostics = { - isEnabled: () => boolean, - simulateEarlyJavaScriptErrors: () => void, -}; -export type RuntimeDiagnosticFlag = \\"early_js_errors\\" | \\"all\\"; -declare const ReactNativeRuntimeDiagnostics: RuntimeDiagnostics; -declare export default typeof ReactNativeRuntimeDiagnostics; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/RendererImplementation.js 1`] = ` -"declare export function renderElement($$PARAM_0$$: { - element: React.MixedElement, - rootTag: number, - useFabric: boolean, - useConcurrentRoot: boolean, -}): void; -declare export function findHostInstance_DEPRECATED< - TElementType: React.ElementType, ->( - componentOrHandle: ?(React.ElementRef | number) -): ?HostInstance; -declare export function findNodeHandle( - componentOrHandle: ?(React.ElementRef | number) -): ?number; -declare export function dispatchCommand( - handle: HostInstance, - command: string, - args: Array -): void; -declare export function sendAccessibilityEvent( - handle: HostInstance, - eventType: string -): void; -declare export function unmountComponentAtNodeAndRemoveContainer( - rootTag: RootTag -): void; -declare export function unstable_batchedUpdates( - fn: (T) => void, - bookkeeping: T -): void; -declare export function isProfilingRenderer(): boolean; -declare export function isChildPublicInstance( - parentInstance: HostInstance, - childInstance: HostInstance -): boolean; -declare export function getNodeFromInternalInstanceHandle( - internalInstanceHandle: InternalInstanceHandle -): ?Node; -declare export function getPublicInstanceFromInternalInstanceHandle( - internalInstanceHandle: InternalInstanceHandle -): mixed; -declare export function getPublicInstanceFromRootTag(rootTag: number): mixed; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/RendererProxy.js 1`] = ` -"export * from \\"./RendererImplementation\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/RootTag.js 1`] = ` -"declare export opaque type RootTag; -declare export const RootTagContext: React.Context; -declare export function createRootTag(rootTag: number | RootTag): RootTag; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/UIManager.js 1`] = ` -"declare const UIManager: UIManagerJSInterface; -declare export default typeof UIManager; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/UIManagerProperties.js 1`] = ` -"declare const UIManagerProperties: $ReadOnlyArray; -declare export default typeof UIManagerProperties; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/getCachedComponentWithDebugName.js 1`] = ` -"type NoopComponent = component(children: React.Node); -declare export default function getCachedComponentWithDisplayName( - displayName: string -): NoopComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/getNativeComponentAttributes.js 1`] = ` -"declare function getNativeComponentAttributes(uiViewClassName: string): any; -declare export default typeof getNativeComponentAttributes; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/renderApplication.js 1`] = ` -"declare export default function renderApplication( - RootComponent: React.ComponentType, - initialProps: Props, - rootTag: any, - WrapperComponent?: ?React.ComponentType, - rootViewStyle?: ?ViewStyleProp, - fabric?: boolean, - scopedPerformanceLogger?: IPerformanceLogger, - isLogBox?: boolean, - debugName?: string, - displayMode?: ?DisplayModeType, - useOffscreen?: boolean -): void; -" -`; - -exports[`public API should not change unintentionally Libraries/ReactNative/requireNativeComponent.js 1`] = ` -"declare const requireNativeComponent: ( - uiViewClassName: string -) => HostComponent; -declare export default typeof requireNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Settings/NativeSettingsManager.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeSettingsManager\\"; -declare export default typeof NativeSettingsManager; -" -`; - -exports[`public API should not change unintentionally Libraries/Settings/Settings.js 1`] = ` -"declare let Settings: { - get(key: string): any, - set(settings: Object): void, - watchKeys(keys: string | Array, callback: () => void): number, - clearWatch(watchId: number): void, - ... -}; -declare export default typeof Settings; -" -`; - -exports[`public API should not change unintentionally Libraries/Settings/SettingsFallback.js 1`] = ` -"declare const Settings: { - get(key: string): any, - set(settings: Object): void, - watchKeys(keys: string | Array, callback: () => void): number, - clearWatch(watchId: number): void, -}; -declare export default typeof Settings; -" -`; - -exports[`public API should not change unintentionally Libraries/Share/NativeShareModule.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeShareModule\\"; -declare export default typeof NativeShareModule; -" -`; - -exports[`public API should not change unintentionally Libraries/Share/Share.js 1`] = ` -"export type ShareContent = - | { - title?: string, - url: string, - message?: string, - } - | { - title?: string, - url?: string, - message: string, - }; -export type ShareOptions = { - dialogTitle?: string, - excludedActivityTypes?: Array, - tintColor?: ColorValue, - subject?: string, - anchor?: number, -}; -export type ShareAction = { - action: \\"sharedAction\\" | \\"dismissedAction\\", - activityType?: string | null, -}; -declare class Share { - static share( - content: ShareContent, - options?: ShareOptions - ): Promise<{ action: string, activityType: ?string }>; - static sharedAction: \\"sharedAction\\"; - static dismissedAction: \\"dismissedAction\\"; -} -declare export default typeof Share; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/EdgeInsetsPropType.js 1`] = ` -"export type EdgeInsetsProp = Rect; -export type EdgeInsetsOrSizeProp = RectOrSize; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/PlatformColorValueTypes.js 1`] = ` -"export * from \\"./PlatformColorValueTypes\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/PlatformColorValueTypes.js.flow 1`] = ` -"declare export function PlatformColor(...names: Array): ColorValue; -declare export function normalizeColorObject( - color: NativeColorValue -): ?ProcessedColorValue; -declare export function processColorObject( - color: NativeColorValue -): ?NativeColorValue; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/PlatformColorValueTypesIOS.js 1`] = ` -"export type DynamicColorIOSTuple = { - light: ColorValue, - dark: ColorValue, - highContrastLight?: ColorValue, - highContrastDark?: ColorValue, -}; -declare export const DynamicColorIOS: ( - tuple: DynamicColorIOSTuple -) => ColorValue; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/PointPropType.js 1`] = ` -"export type PointProp = $ReadOnly<{ - x: number, - y: number, - ... -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/Rect.js 1`] = ` -"export type Rect = $ReadOnly<{ - bottom?: ?number, - left?: ?number, - right?: ?number, - top?: ?number, -}>; -export type Insets = Rect; -export type RectOrSize = Rect | number; -declare export function createSquare(size: number): Rect; -declare export function normalizeRect(rectOrSize: ?RectOrSize): ?Rect; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/StyleSheet.js 1`] = ` -"declare const StyleSheet: StyleSheetExports; -export type { - BoxShadowValue, - NativeColorValue, - FilterFunction, -} from \\"./StyleSheetTypes\\"; -export type ColorValue = ____ColorValue_Internal; -export type OpaqueColorValue = NativeColorValue; -export type TransformsStyle = ____TransformStyle_Internal; -export type FontVariant = ____FontVariant_Internal; -export type ViewStyleProp = ____ViewStyleProp_Internal; -export type TextStyleProp = ____TextStyleProp_Internal; -export type ImageStyleProp = ____ImageStyleProp_Internal; -export type DangerouslyImpreciseStyleProp = - ____DangerouslyImpreciseStyleProp_Internal; -export type TypeForStyleKey< - +key: $Keys<____DangerouslyImpreciseStyle_Internal>, -> = ____DangerouslyImpreciseStyle_Internal[key]; -export type ViewStyle = ____ViewStyle_Internal; -export type TextStyle = ____TextStyle_Internal; -export type ImageStyle = ____ImageStyle_Internal; -export type DangerouslyImpreciseStyle = ____DangerouslyImpreciseStyle_Internal; -declare export default typeof StyleSheet; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/StyleSheet.js.flow 1`] = ` -"export * as default from \\"./StyleSheetExports\\"; -export type { - BoxShadowValue, - FilterFunction, - NativeColorValue, - StyleProp, -} from \\"./StyleSheetTypes\\"; -export type StyleSheetProperties = { - hairlineWidth: number, - flatten(style: T): T, -}; -export type ColorValue = ____ColorValue_Internal; -export type OpaqueColorValue = NativeColorValue; -export type TransformsStyle = ____TransformStyle_Internal; -export type FontVariant = ____FontVariant_Internal; -export type ViewStyleProp = ____ViewStyleProp_Internal; -export type TextStyleProp = ____TextStyleProp_Internal; -export type ImageStyleProp = ____ImageStyleProp_Internal; -export type DangerouslyImpreciseStyleProp = - ____DangerouslyImpreciseStyleProp_Internal; -export type TypeForStyleKey< - +key: $Keys<____DangerouslyImpreciseStyle_Internal>, -> = ____DangerouslyImpreciseStyle_Internal[key]; -export type ViewStyle = ____ViewStyle_Internal; -export type TextStyle = ____TextStyle_Internal; -export type ImageStyle = ____ImageStyle_Internal; -export type DangerouslyImpreciseStyle = ____DangerouslyImpreciseStyle_Internal; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/StyleSheetExports.js 1`] = ` -"declare let hairlineWidth: number; -declare const absoluteFill: { - +bottom: 0, - +left: 0, - +position: \\"absolute\\", - +right: 0, - +top: 0, -}; -declare export default { - hairlineWidth: typeof hairlineWidth, - absoluteFill: any, - absoluteFillObject: typeof absoluteFill, - compose: typeof composeStyles, - flatten: typeof flatten, - setStyleAttributePreprocessor( - property: string, - process: (nextProp: mixed) => mixed - ): void, - create<+S: ____Styles_Internal>(obj: S): $ReadOnly, -}; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/StyleSheetExports.js.flow 1`] = ` -"declare export const hairlineWidth: number; -declare export const absoluteFill: any; -declare export const absoluteFillObject: { - +bottom: 0, - +left: 0, - +position: \\"absolute\\", - +right: 0, - +top: 0, -}; -declare export const compose: typeof composeStyles; -declare export const flatten: typeof flattenStyle; -declare export const setStyleAttributePreprocessor: ( - property: string, - process: (nextProp: any) => any -) => void; -declare export const create: <+S: ____Styles_Internal>( - obj: S & ____Styles_Internal -) => $ReadOnly; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/StyleSheetTypes.js 1`] = ` -"export type { ____TransformStyle_Internal }; -declare export opaque type NativeColorValue; -export type ____ColorValue_Internal = null | string | number | NativeColorValue; -export type ColorArrayValue = null | $ReadOnlyArray<____ColorValue_Internal>; -export type PointValue = { - x: number, - y: number, -}; -export type EdgeInsetsValue = { - top: number, - left: number, - right: number, - bottom: number, -}; -export type DimensionValue = number | string | \\"auto\\" | null; -export type CursorValue = \\"auto\\" | \\"pointer\\"; -type ____LayoutStyle_Internal = $ReadOnly<{ - display?: \\"none\\" | \\"flex\\" | \\"contents\\", - width?: DimensionValue, - height?: DimensionValue, - bottom?: DimensionValue, - end?: DimensionValue, - left?: DimensionValue, - right?: DimensionValue, - start?: DimensionValue, - top?: DimensionValue, - inset?: DimensionValue, - insetBlock?: DimensionValue, - insetBlockEnd?: DimensionValue, - insetBlockStart?: DimensionValue, - insetInline?: DimensionValue, - insetInlineEnd?: DimensionValue, - insetInlineStart?: DimensionValue, - minWidth?: DimensionValue, - maxWidth?: DimensionValue, - minHeight?: DimensionValue, - maxHeight?: DimensionValue, - margin?: DimensionValue, - marginBlock?: DimensionValue, - marginBlockEnd?: DimensionValue, - marginBlockStart?: DimensionValue, - marginBottom?: DimensionValue, - marginEnd?: DimensionValue, - marginHorizontal?: DimensionValue, - marginInline?: DimensionValue, - marginInlineEnd?: DimensionValue, - marginInlineStart?: DimensionValue, - marginLeft?: DimensionValue, - marginRight?: DimensionValue, - marginStart?: DimensionValue, - marginTop?: DimensionValue, - marginVertical?: DimensionValue, - padding?: DimensionValue, - paddingBlock?: DimensionValue, - paddingBlockEnd?: DimensionValue, - paddingBlockStart?: DimensionValue, - paddingBottom?: DimensionValue, - paddingEnd?: DimensionValue, - paddingHorizontal?: DimensionValue, - paddingInline?: DimensionValue, - paddingInlineEnd?: DimensionValue, - paddingInlineStart?: DimensionValue, - paddingLeft?: DimensionValue, - paddingRight?: DimensionValue, - paddingStart?: DimensionValue, - paddingTop?: DimensionValue, - paddingVertical?: DimensionValue, - borderWidth?: number, - borderBottomWidth?: number, - borderEndWidth?: number, - borderLeftWidth?: number, - borderRightWidth?: number, - borderStartWidth?: number, - borderTopWidth?: number, - position?: \\"absolute\\" | \\"relative\\" | \\"static\\", - flexDirection?: \\"row\\" | \\"row-reverse\\" | \\"column\\" | \\"column-reverse\\", - flexWrap?: \\"wrap\\" | \\"nowrap\\" | \\"wrap-reverse\\", - justifyContent?: - | \\"flex-start\\" - | \\"flex-end\\" - | \\"center\\" - | \\"space-between\\" - | \\"space-around\\" - | \\"space-evenly\\", - alignItems?: \\"flex-start\\" | \\"flex-end\\" | \\"center\\" | \\"stretch\\" | \\"baseline\\", - alignSelf?: - | \\"auto\\" - | \\"flex-start\\" - | \\"flex-end\\" - | \\"center\\" - | \\"stretch\\" - | \\"baseline\\", - alignContent?: - | \\"flex-start\\" - | \\"flex-end\\" - | \\"center\\" - | \\"stretch\\" - | \\"space-between\\" - | \\"space-around\\" - | \\"space-evenly\\", - overflow?: \\"visible\\" | \\"hidden\\" | \\"scroll\\", - flex?: number, - flexGrow?: number, - flexShrink?: number, - flexBasis?: number | string, - aspectRatio?: number | string, - boxSizing?: \\"border-box\\" | \\"content-box\\", - zIndex?: number, - direction?: \\"inherit\\" | \\"ltr\\" | \\"rtl\\", - rowGap?: number | string, - columnGap?: number | string, - gap?: number | string, -}>; -export type ____ShadowStyle_InternalCore = $ReadOnly<{ - shadowColor?: ____ColorValue_Internal, - shadowOffset?: $ReadOnly<{ - width?: number, - height?: number, - }>, - shadowOpacity?: number, - shadowRadius?: number, -}>; -export type ____ShadowStyle_Internal = $ReadOnly<{ - ...____ShadowStyle_InternalCore, - ...____ShadowStyle_InternalOverrides, -}>; -export type FilterFunction = - | { brightness: number | string } - | { blur: number | string } - | { contrast: number | string } - | { grayscale: number | string } - | { hueRotate: number | string } - | { invert: number | string } - | { opacity: number | string } - | { saturate: number | string } - | { sepia: number | string } - | { dropShadow: DropShadowValue | string }; -export type DropShadowValue = { - offsetX: number | string, - offsetY: number | string, - standardDeviation?: number | string, - color?: ____ColorValue_Internal, -}; -type LinearGradientValue = { - type: \\"linear-gradient\\", - direction?: string, - colorStops: $ReadOnlyArray<{ - color: ____ColorValue_Internal, - positions?: $ReadOnlyArray, - }>, -}; -type RadialExtent = - | \\"closest-corner\\" - | \\"closest-side\\" - | \\"farthest-corner\\" - | \\"farthest-side\\"; -export type RadialGradientPosition = - | { - top: number | string, - left: number | string, - } - | { - top: number | string, - right: number | string, - } - | { - bottom: number | string, - left: number | string, - } - | { - bottom: number | string, - right: number | string, - }; -export type RadialGradientShape = \\"circle\\" | \\"ellipse\\"; -export type RadialGradientSize = - | RadialExtent - | { - x: string | number, - y: string | number, - }; -type RadialGradientValue = { - type: \\"radial-gradient\\", - shape: RadialGradientShape, - size: RadialGradientSize, - position: RadialGradientPosition, - colorStops: $ReadOnlyArray<{ - color: ____ColorValue_Internal, - positions?: $ReadOnlyArray, - }>, -}; -export type BackgroundImageValue = LinearGradientValue | RadialGradientValue; -export type BoxShadowValue = { - offsetX: number | string, - offsetY: number | string, - color?: ____ColorValue_Internal, - blurRadius?: number | string, - spreadDistance?: number | string, - inset?: boolean, -}; -type ____BlendMode_Internal = - | \\"normal\\" - | \\"multiply\\" - | \\"screen\\" - | \\"overlay\\" - | \\"darken\\" - | \\"lighten\\" - | \\"color-dodge\\" - | \\"color-burn\\" - | \\"hard-light\\" - | \\"soft-light\\" - | \\"difference\\" - | \\"exclusion\\" - | \\"hue\\" - | \\"saturation\\" - | \\"color\\" - | \\"luminosity\\"; -export type ____ViewStyle_InternalBase = $ReadOnly<{ - backfaceVisibility?: \\"visible\\" | \\"hidden\\", - backgroundColor?: ____ColorValue_Internal, - borderColor?: ____ColorValue_Internal, - borderCurve?: \\"circular\\" | \\"continuous\\", - borderBottomColor?: ____ColorValue_Internal, - borderEndColor?: ____ColorValue_Internal, - borderLeftColor?: ____ColorValue_Internal, - borderRightColor?: ____ColorValue_Internal, - borderStartColor?: ____ColorValue_Internal, - borderTopColor?: ____ColorValue_Internal, - borderBlockColor?: ____ColorValue_Internal, - borderBlockEndColor?: ____ColorValue_Internal, - borderBlockStartColor?: ____ColorValue_Internal, - borderRadius?: number | string, - borderBottomEndRadius?: number | string, - borderBottomLeftRadius?: number | string, - borderBottomRightRadius?: number | string, - borderBottomStartRadius?: number | string, - borderEndEndRadius?: number | string, - borderEndStartRadius?: number | string, - borderStartEndRadius?: number | string, - borderStartStartRadius?: number | string, - borderTopEndRadius?: number | string, - borderTopLeftRadius?: number | string, - borderTopRightRadius?: number | string, - borderTopStartRadius?: number | string, - borderStyle?: \\"solid\\" | \\"dotted\\" | \\"dashed\\", - borderWidth?: number, - borderBottomWidth?: number, - borderEndWidth?: number, - borderLeftWidth?: number, - borderRightWidth?: number, - borderStartWidth?: number, - borderTopWidth?: number, - opacity?: number, - outlineColor?: ____ColorValue_Internal, - outlineOffset?: number, - outlineStyle?: \\"solid\\" | \\"dotted\\" | \\"dashed\\", - outlineWidth?: number, - elevation?: number, - pointerEvents?: \\"auto\\" | \\"none\\" | \\"box-none\\" | \\"box-only\\", - cursor?: CursorValue, - boxShadow?: $ReadOnlyArray | string, - filter?: $ReadOnlyArray | string, - mixBlendMode?: ____BlendMode_Internal, - experimental_backgroundImage?: $ReadOnlyArray | string, - isolation?: \\"auto\\" | \\"isolate\\", -}>; -export type ____ViewStyle_InternalCore = $ReadOnly<{ - ...$Exact<____LayoutStyle_Internal>, - ...$Exact<____ShadowStyle_Internal>, - ...$Exact<____TransformStyle_Internal>, - ...____ViewStyle_InternalBase, -}>; -export type ____ViewStyle_Internal = $ReadOnly<{ - ...____ViewStyle_InternalCore, - ...____ViewStyle_InternalOverrides, -}>; -export type FontStyleType = { - fontFamily: string, - fontWeight: ____FontWeight_Internal, -}; -export type FontStyleMap = { - ultraLight: FontStyleType, - thin: FontStyleType, - light: FontStyleType, - regular: FontStyleType, - medium: FontStyleType, - semibold: FontStyleType, - bold: FontStyleType, - heavy: FontStyleType, - black: FontStyleType, -}; -export type ____FontWeight_Internal = - | \\"normal\\" - | \\"bold\\" - | \\"100\\" - | \\"200\\" - | \\"300\\" - | \\"400\\" - | \\"500\\" - | \\"600\\" - | \\"700\\" - | \\"800\\" - | \\"900\\" - | 100 - | 200 - | 300 - | 400 - | 500 - | 600 - | 700 - | 800 - | 900 - | \\"ultralight\\" - | \\"thin\\" - | \\"light\\" - | \\"medium\\" - | \\"regular\\" - | \\"semibold\\" - | \\"condensedBold\\" - | \\"condensed\\" - | \\"heavy\\" - | \\"black\\"; -export type ____FontVariant_Internal = - | \\"small-caps\\" - | \\"oldstyle-nums\\" - | \\"lining-nums\\" - | \\"tabular-nums\\" - | \\"common-ligatures\\" - | \\"no-common-ligatures\\" - | \\"discretionary-ligatures\\" - | \\"no-discretionary-ligatures\\" - | \\"historical-ligatures\\" - | \\"no-historical-ligatures\\" - | \\"contextual\\" - | \\"no-contextual\\" - | \\"proportional-nums\\" - | \\"stylistic-one\\" - | \\"stylistic-two\\" - | \\"stylistic-three\\" - | \\"stylistic-four\\" - | \\"stylistic-five\\" - | \\"stylistic-six\\" - | \\"stylistic-seven\\" - | \\"stylistic-eight\\" - | \\"stylistic-nine\\" - | \\"stylistic-ten\\" - | \\"stylistic-eleven\\" - | \\"stylistic-twelve\\" - | \\"stylistic-thirteen\\" - | \\"stylistic-fourteen\\" - | \\"stylistic-fifteen\\" - | \\"stylistic-sixteen\\" - | \\"stylistic-seventeen\\" - | \\"stylistic-eighteen\\" - | \\"stylistic-nineteen\\" - | \\"stylistic-twenty\\"; -export type ____FontVariantArray_Internal = - $ReadOnlyArray<____FontVariant_Internal>; -type ____TextStyle_InternalBase = $ReadOnly<{ - color?: ____ColorValue_Internal, - fontFamily?: string, - fontSize?: number, - fontStyle?: \\"normal\\" | \\"italic\\", - fontWeight?: ____FontWeight_Internal, - fontVariant?: ____FontVariantArray_Internal | string, - textShadowOffset?: $ReadOnly<{ - width: number, - height: number, - }>, - textShadowRadius?: number, - textShadowColor?: ____ColorValue_Internal, - letterSpacing?: number, - lineHeight?: number, - textAlign?: \\"auto\\" | \\"left\\" | \\"right\\" | \\"center\\" | \\"justify\\", - textAlignVertical?: \\"auto\\" | \\"top\\" | \\"bottom\\" | \\"center\\", - includeFontPadding?: boolean, - textDecorationLine?: - | \\"none\\" - | \\"underline\\" - | \\"line-through\\" - | \\"underline line-through\\", - textDecorationStyle?: \\"solid\\" | \\"double\\" | \\"dotted\\" | \\"dashed\\", - textDecorationColor?: ____ColorValue_Internal, - textTransform?: \\"none\\" | \\"capitalize\\" | \\"uppercase\\" | \\"lowercase\\", - userSelect?: \\"auto\\" | \\"text\\" | \\"none\\" | \\"contain\\" | \\"all\\", - verticalAlign?: \\"auto\\" | \\"top\\" | \\"bottom\\" | \\"middle\\", - writingDirection?: \\"auto\\" | \\"ltr\\" | \\"rtl\\", -}>; -export type ____TextStyle_InternalCore = $ReadOnly<{ - ...$Exact<____ViewStyle_Internal>, - ...____TextStyle_InternalBase, -}>; -export type ____TextStyle_Internal = $ReadOnly<{ - ...____TextStyle_InternalCore, - ...____TextStyle_InternalOverrides, -}>; -export type ____ImageStyle_InternalCore = $ReadOnly<{ - ...$Exact<____ViewStyle_Internal>, - resizeMode?: ImageResizeMode, - objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\", - tintColor?: ____ColorValue_Internal, - overlayColor?: ColorValue, - overflow?: \\"visible\\" | \\"hidden\\", -}>; -export type ____ImageStyle_Internal = $ReadOnly<{ - ...____ImageStyle_InternalCore, - ...____ImageStyle_InternalOverrides, -}>; -export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{ - ...$Exact<____TextStyle_Internal>, - resizeMode?: ImageResizeMode, - objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\", - tintColor?: ____ColorValue_Internal, - overlayColor?: ColorValue, -}>; -export type ____DangerouslyImpreciseStyle_Internal = $ReadOnly<{ - ...____DangerouslyImpreciseStyle_InternalCore, - ...____DangerouslyImpreciseStyle_InternalOverrides, - ... -}>; -export type StyleProp<+T> = - | null - | void - | T - | false - | \\"\\" - | $ReadOnlyArray>; -export type ____DangerouslyImpreciseStyleProp_Internal = StyleProp< - Partial<____DangerouslyImpreciseStyle_Internal>, ->; -export type ____DangerouslyImpreciseAnimatedStyleProp_Internal = - WithAnimatedValue>>; -export type ____ViewStyleProp_Internal = StyleProp< - $ReadOnly>, ->; -export type ____TextStyleProp_Internal = StyleProp< - $ReadOnly>, ->; -export type ____ImageStyleProp_Internal = StyleProp< - $ReadOnly>, ->; -export type ____Styles_Internal = { - +[key: string]: Partial<____DangerouslyImpreciseStyle_Internal>, - ... -}; -type FlattenDepthLimiter = [void, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; -type ____FlattenStyleProp_Helper< - +TStyleProp: StyleProp, - Depth: $Values = 9, -> = Depth extends 0 - ? empty - : TStyleProp extends null | void | false | \\"\\" - ? empty - : TStyleProp extends $ReadOnlyArray - ? ____FlattenStyleProp_Helper< - V, - Depth extends number ? FlattenDepthLimiter[Depth] : 0, - > - : TStyleProp; -export type ____FlattenStyleProp_Internal<+TStyleProp: StyleProp> = - ____FlattenStyleProp_Helper extends empty - ? any - : ____FlattenStyleProp_Helper; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/flattenStyle.js 1`] = ` -"type NonAnimatedNodeObject = TStyleProp extends AnimatedNode - ? empty - : TStyleProp; -declare function flattenStyle< - TStyleProp: ____DangerouslyImpreciseAnimatedStyleProp_Internal, ->( - style: ?TStyleProp -): ?NonAnimatedNodeObject<____FlattenStyleProp_Internal>; -declare export default typeof flattenStyle; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/normalizeColor.js 1`] = ` -"declare function normalizeColor( - color: ?(ColorValue | ProcessedColorValue) -): ?ProcessedColorValue; -declare export default typeof normalizeColor; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js 1`] = ` -"export type ____DangerouslyImpreciseStyle_InternalOverrides = $ReadOnly<{}>; -export type ____ImageStyle_InternalOverrides = $ReadOnly<{}>; -export type ____ShadowStyle_InternalOverrides = $ReadOnly<{}>; -export type ____TextStyle_InternalOverrides = $ReadOnly<{}>; -export type ____ViewStyle_InternalOverrides = $ReadOnly<{}>; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/private/_TransformStyle.js 1`] = ` -"type KeysOfUnion = T extends any ? $Keys : empty; -type ValueOfUnion = T extends any - ? K extends $Keys - ? T[K] - : empty - : empty; -type MergeUnion = { - [K in KeysOfUnion]?: ValueOfUnion, -}; -type MaximumOneOf = $Values<{ - [K in keyof T]: $Exact<{ - [P in keyof T]?: P extends K ? T[P] : empty, - }>, -}>; -export type ____TransformStyle_Internal = $ReadOnly<{ - transform?: - | $ReadOnlyArray< - $ReadOnly< - MaximumOneOf< - MergeUnion< - | { +perspective: number | AnimatedNode } - | { +rotate: string | AnimatedNode } - | { +rotateX: string | AnimatedNode } - | { +rotateY: string | AnimatedNode } - | { +rotateZ: string | AnimatedNode } - | { +scale: number | AnimatedNode } - | { +scaleX: number | AnimatedNode } - | { +scaleY: number | AnimatedNode } - | { +translateX: number | string | AnimatedNode } - | { +translateY: number | string | AnimatedNode } - | { - +translate: - | [ - number | string | AnimatedNode, - number | string | AnimatedNode, - ] - | AnimatedNode, - } - | { +skewX: string | AnimatedNode } - | { +skewY: string | AnimatedNode } - | { - +matrix: $ReadOnlyArray | AnimatedNode, - }, - >, - >, - >, - > - | string, - transformOrigin?: - | [string | number, string | number, string | number] - | string, -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/processAspectRatio.js 1`] = ` -"declare function processAspectRatio(aspectRatio?: number | string): ?number; -declare export default typeof processAspectRatio; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/processBackgroundImage.js 1`] = ` -"type LinearGradientDirection = - | { type: \\"angle\\", value: number } - | { type: \\"keyword\\", value: string }; -type LinearGradientBackgroundImage = { - type: \\"linear-gradient\\", - direction: LinearGradientDirection, - colorStops: $ReadOnlyArray<{ - color: ColorStopColor, - position: ColorStopPosition, - }>, -}; -type RadialGradientBackgroundImage = { - type: \\"radial-gradient\\", - shape: RadialGradientShape, - size: RadialGradientSize, - position: RadialGradientPosition, - colorStops: $ReadOnlyArray<{ - color: ColorStopColor, - position: ColorStopPosition, - }>, -}; -type ColorStopColor = ProcessedColorValue | null; -type ColorStopPosition = number | string | null; -type ParsedBackgroundImageValue = - | LinearGradientBackgroundImage - | RadialGradientBackgroundImage; -declare export default function processBackgroundImage( - backgroundImage: ?($ReadOnlyArray | string) -): $ReadOnlyArray; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/processBoxShadow.js 1`] = ` -"export type ParsedBoxShadow = { - offsetX: number, - offsetY: number, - color?: ProcessedColorValue, - blurRadius?: number, - spreadDistance?: number, - inset?: boolean, -}; -declare export default function processBoxShadow( - rawBoxShadows: ?($ReadOnlyArray | string) -): Array; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/processColor.js 1`] = ` -"export type ProcessedColorValue = number | NativeColorValue; -declare function processColor( - color?: ?(number | ColorValue) -): ?ProcessedColorValue; -declare export default typeof processColor; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/processColorArray.js 1`] = ` -"declare function processColorArray( - colors: ?$ReadOnlyArray -): ?$ReadOnlyArray; -declare export default typeof processColorArray; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/processFilter.js 1`] = ` -"type ParsedFilter = - | { brightness: number } - | { blur: number } - | { contrast: number } - | { grayscale: number } - | { hueRotate: number } - | { invert: number } - | { opacity: number } - | { saturate: number } - | { sepia: number } - | { dropShadow: ParsedDropShadow }; -type ParsedDropShadow = { - offsetX: number, - offsetY: number, - standardDeviation?: number, - color?: ColorValue, -}; -declare export default function processFilter( - filter: ?($ReadOnlyArray | string) -): $ReadOnlyArray; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/processFontVariant.js 1`] = ` -"declare function processFontVariant( - fontVariant: ____FontVariantArray_Internal | string -): ?____FontVariantArray_Internal; -declare export default typeof processFontVariant; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/processTransform.js 1`] = ` -"declare function processTransform( - transform: Array | string -): Array | Array; -declare export default typeof processTransform; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/processTransformOrigin.js 1`] = ` -"declare export default function processTransformOrigin( - transformOrigin: Array | string -): Array; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/setNormalizedColorAlpha.js 1`] = ` -"declare function setNormalizedColorAlpha(input: number, alpha: number): number; -declare export default typeof setNormalizedColorAlpha; -" -`; - -exports[`public API should not change unintentionally Libraries/StyleSheet/splitLayoutProps.js 1`] = ` -"declare export default function splitLayoutProps( - props: ?____ViewStyle_Internal -): { - outer: ?____ViewStyle_Internal, - inner: ?____ViewStyle_Internal, -}; -" -`; - -exports[`public API should not change unintentionally Libraries/Text/Text.js 1`] = ` -"export type { TextProps } from \\"./TextProps\\"; -type TextForwardRef = React.ElementRef< - typeof NativeText | typeof NativeVirtualText, ->; -declare const TextImpl: component( - ref?: React.RefSetter, - ...props: TextProps -); -declare export default typeof TextImpl; -" -`; - -exports[`public API should not change unintentionally Libraries/Text/TextAncestor.js 1`] = ` -"declare const TextAncestorContext: React.Context; -declare export default typeof TextAncestorContext; -" -`; - -exports[`public API should not change unintentionally Libraries/Text/TextNativeComponent.js 1`] = ` -"export type NativeTextProps = $ReadOnly<{ - ...TextProps, - isHighlighted?: ?boolean, - selectionColor?: ?ProcessedColorValue, - onClick?: ?(event: GestureResponderEvent) => mixed, - isPressable?: ?boolean, -}>; -declare export const NativeText: HostComponent; -declare export const NativeVirtualText: HostComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Text/TextProps.js 1`] = ` -"export type PressRetentionOffset = $ReadOnly<{ - top: number, - left: number, - bottom: number, - right: number, -}>; -type TextPointerEventProps = $ReadOnly<{ - onPointerEnter?: (event: PointerEvent) => void, - onPointerLeave?: (event: PointerEvent) => void, - onPointerMove?: (event: PointerEvent) => void, -}>; -export type TextPropsIOS = { - adjustsFontSizeToFit?: ?boolean, - dynamicTypeRamp?: ?( - | \\"caption2\\" - | \\"caption1\\" - | \\"footnote\\" - | \\"subheadline\\" - | \\"callout\\" - | \\"body\\" - | \\"headline\\" - | \\"title3\\" - | \\"title2\\" - | \\"title1\\" - | \\"largeTitle\\" - ), - suppressHighlighting?: ?boolean, - lineBreakStrategyIOS?: ?(\\"none\\" | \\"standard\\" | \\"hangul-word\\" | \\"push-out\\"), -}; -export type TextPropsAndroid = { - disabled?: ?boolean, - selectionColor?: ?ColorValue, - dataDetectorType?: ?(\\"phoneNumber\\" | \\"link\\" | \\"email\\" | \\"none\\" | \\"all\\"), - textBreakStrategy?: ?(\\"balanced\\" | \\"highQuality\\" | \\"simple\\"), - adjustsFontSizeToFit?: ?boolean, - minimumFontScale?: ?number, -}; -type TextBaseProps = $ReadOnly<{ - onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed, - allowFontScaling?: ?boolean, - android_hyphenationFrequency?: ?(\\"normal\\" | \\"none\\" | \\"full\\"), - children?: ?React.Node, - ellipsizeMode?: ?(\\"clip\\" | \\"head\\" | \\"middle\\" | \\"tail\\"), - id?: string, - maxFontSizeMultiplier?: ?number, - nativeID?: ?string, - numberOfLines?: ?number, - onLayout?: ?(event: LayoutChangeEvent) => mixed, - onLongPress?: ?(event: GestureResponderEvent) => mixed, - onPress?: ?(event: GestureResponderEvent) => mixed, - onPressIn?: ?(event: GestureResponderEvent) => mixed, - onPressOut?: ?(event: GestureResponderEvent) => mixed, - onResponderGrant?: ?(event: GestureResponderEvent) => void, - onResponderMove?: ?(event: GestureResponderEvent) => void, - onResponderRelease?: ?(event: GestureResponderEvent) => void, - onResponderTerminate?: ?(event: GestureResponderEvent) => void, - onResponderTerminationRequest?: ?() => boolean, - onStartShouldSetResponder?: ?() => boolean, - onMoveShouldSetResponder?: ?() => boolean, - onTextLayout?: ?(event: TextLayoutEvent) => mixed, - pressRetentionOffset?: ?PressRetentionOffset, - role?: ?Role, - selectable?: ?boolean, - style?: ?TextStyleProp, - testID?: ?string, -}>; -export type TextProps = $ReadOnly<{ - ...TextPointerEventProps, - ...TextPropsIOS, - ...TextPropsAndroid, - ...TextBaseProps, - ...AccessibilityProps, -}>; -" -`; - -exports[`public API should not change unintentionally Libraries/TurboModule/RCTExport.js 1`] = ` -"export interface DEPRECATED_RCTExport { - +getConstants?: () => { ... }; -} -export interface TurboModule extends DEPRECATED_RCTExport {} -export type { RootTag } from \\"../Types/RootTagTypes.js\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/TurboModule/TurboModuleRegistry.js 1`] = ` -"declare export function get(name: string): ?T; -declare export function getEnforcing(name: string): T; -" -`; - -exports[`public API should not change unintentionally Libraries/TurboModule/samples/NativeSampleTurboModule.js 1`] = ` -"export * from \\"../../../src/private/specs_DEPRECATED/modules/NativeSampleTurboModule\\"; -declare export default typeof NativeSampleTurboModule; -" -`; - -exports[`public API should not change unintentionally Libraries/Types/CodegenTypes.js 1`] = ` -"export type BubblingEventHandler = ( - event: NativeSyntheticEvent -) => void | Promise; -export type DirectEventHandler = ( - event: NativeSyntheticEvent -) => void | Promise; -export type Double = number; -export type Float = number; -export type Int32 = number; -export type UnsafeObject = Object; -export type UnsafeMixed = mixed; -type DefaultTypes = number | boolean | string | $ReadOnlyArray; -export type WithDefault = ?Type; -export type EventEmitter = ( - handler: (T) => void | Promise -) => EventSubscription; -" -`; - -exports[`public API should not change unintentionally Libraries/Types/CodegenTypesNamespace.js 1`] = ` -"export type { CodegenTypes }; -" -`; - -exports[`public API should not change unintentionally Libraries/Types/CoreEventTypes.js 1`] = ` -"export type NativeSyntheticEvent<+T> = $ReadOnly<{ - bubbles: ?boolean, - cancelable: ?boolean, - currentTarget: number | HostInstance, - defaultPrevented: ?boolean, - dispatchConfig: $ReadOnly<{ - registrationName: string, - }>, - eventPhase: ?number, - preventDefault: () => void, - isDefaultPrevented: () => boolean, - stopPropagation: () => void, - isPropagationStopped: () => boolean, - isTrusted: ?boolean, - nativeEvent: T, - persist: () => void, - target: ?number | HostInstance, - timeStamp: number, - type: ?string, -}>; -export type ResponderSyntheticEvent = $ReadOnly<{ - ...NativeSyntheticEvent, - touchHistory: $ReadOnly<{ - indexOfSingleActiveTouch: number, - mostRecentTimeStamp: number, - numberActiveTouches: number, - touchBank: $ReadOnlyArray< - $ReadOnly<{ - touchActive: boolean, - startPageX: number, - startPageY: number, - startTimeStamp: number, - currentPageX: number, - currentPageY: number, - currentTimeStamp: number, - previousPageX: number, - previousPageY: number, - previousTimeStamp: number, - }>, - >, - }>, -}>; -export type LayoutRectangle = $ReadOnly<{ - x: number, - y: number, - width: number, - height: number, -}>; -export type TextLayoutLine = $ReadOnly<{ - ...LayoutRectangle, - ascender: number, - capHeight: number, - descender: number, - text: string, - xHeight: number, -}>; -export type LayoutChangeEvent = NativeSyntheticEvent< - $ReadOnly<{ - layout: LayoutRectangle, - }>, ->; -type TextLayoutEventData = $ReadOnly<{ - lines: Array, -}>; -export type TextLayoutEvent = NativeSyntheticEvent; -export interface NativeUIEvent { - +detail: number; -} -export interface NativeMouseEvent extends NativeUIEvent { - +screenX: number; - +screenY: number; - +pageX: number; - +pageY: number; - +clientX: number; - +clientY: number; - +x: number; - +y: number; - +ctrlKey: boolean; - +shiftKey: boolean; - +altKey: boolean; - +metaKey: boolean; - +button: number; - +buttons: number; - +relatedTarget: null | number | HostInstance; - +offsetX: number; - +offsetY: number; -} -export interface NativePointerEvent extends NativeMouseEvent { - +pointerId: number; - +width: number; - +height: number; - +pressure: number; - +tangentialPressure: number; - +tiltX: number; - +tiltY: number; - +twist: number; - +pointerType: string; - +isPrimary: boolean; -} -export type PointerEvent = NativeSyntheticEvent; -export type NativeTouchEvent = $ReadOnly<{ - changedTouches: $ReadOnlyArray, - force?: number, - identifier: number, - locationX: number, - locationY: number, - pageX: number, - pageY: number, - target: ?number, - timestamp: number, - touches: $ReadOnlyArray, -}>; -export type GestureResponderEvent = ResponderSyntheticEvent; -export type NativeScrollRectangle = $ReadOnly<{ - bottom: number, - left: number, - right: number, - top: number, -}>; -export type NativeScrollPoint = $ReadOnly<{ - y: number, - x: number, -}>; -export type NativeScrollVelocity = $ReadOnly<{ - y: number, - x: number, -}>; -export type NativeScrollSize = $ReadOnly<{ - height: number, - width: number, -}>; -export type NativeScrollEvent = $ReadOnly<{ - contentInset: NativeScrollRectangle, - contentOffset: NativeScrollPoint, - contentSize: NativeScrollSize, - layoutMeasurement: NativeScrollSize, - velocity?: NativeScrollVelocity, - zoomScale?: number, - responderIgnoreScroll?: boolean, - targetContentOffset?: NativeScrollPoint, -}>; -export type ScrollEvent = NativeSyntheticEvent; -export type TargetedEvent = $ReadOnly<{ - target: number, - ... -}>; -export type BlurEvent = NativeSyntheticEvent; -export type FocusEvent = NativeSyntheticEvent; -export type MouseEvent = NativeSyntheticEvent< - $ReadOnly<{ - clientX: number, - clientY: number, - pageX: number, - pageY: number, - timestamp: number, - }>, ->; -" -`; - -exports[`public API should not change unintentionally Libraries/Types/ReactDevToolsTypes.js 1`] = ` -"export type InstanceFromReactDevTools = - | HostInstance - | { - canonical?: - | HostInstance - | { - publicInstance?: HostInstance, - }, - }; -export type ReactDevToolsAgentEvents = { - drawTraceUpdates: [Array<{ node: InstanceFromReactDevTools, color: string }>], - disableTraceUpdates: [], - showNativeHighlight: [nodes: Array], - hideNativeHighlight: [], - shutdown: [], - startInspectingNative: [], - stopInspectingNative: [], -}; -export type ReactDevToolsAgent = { - selectNode(node: mixed): void, - stopInspectingNative(value: boolean): void, - addListener>( - event: Event, - listener: (...ReactDevToolsAgentEvents[Event]) => void - ): void, - removeListener( - event: $Keys, - listener: () => void - ): void, -}; -export type ReactDevToolsGlobalHook = { - on: (eventName: string, (agent: ReactDevToolsAgent) => void) => void, - off: (eventName: string, (agent: ReactDevToolsAgent) => void) => void, - reactDevtoolsAgent?: ReactDevToolsAgent, - resolveRNStyle?: mixed, - nativeStyleEditorValidAttributes?: Array, -}; -" -`; - -exports[`public API should not change unintentionally Libraries/Types/RootTagTypes.js 1`] = ` -"export type { RootTag } from \\"../ReactNative/RootTag\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Types/UIManagerJSInterface.js 1`] = ` -"export interface UIManagerJSInterface extends Spec { - +getViewManagerConfig: (viewManagerName: string) => Object; - +hasViewManagerConfig: (viewManagerName: string) => boolean; -} -" -`; - -exports[`public API should not change unintentionally Libraries/UTFSequence.js 1`] = ` -"declare const UTFSequence: { - BOM: string, - BULLET: string, - BULLET_SP: string, - MDASH: string, - MDASH_SP: string, - MIDDOT: string, - MIDDOT_KATAKANA: string, - MIDDOT_SP: string, - NBSP: string, - NDASH: string, - NDASH_SP: string, - NEWLINE: string, - PIZZA: string, - TRIANGLE_LEFT: string, - TRIANGLE_RIGHT: string, -}; -declare export default typeof UTFSequence; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/Appearance.js 1`] = ` -"export type { AppearancePreferences }; -declare export function getColorScheme(): ?ColorSchemeName; -declare export function setColorScheme(colorScheme: ?ColorSchemeName): void; -declare export function addChangeListener( - listener: ({ colorScheme: ?ColorSchemeName }) => void -): EventSubscription; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/BackHandler.js 1`] = ` -"declare export default typeof BackHandler; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/BackHandler.js.flow 1`] = ` -"export type BackPressEventName = \\"backPress\\" | \\"hardwareBackPress\\"; -type TBackHandler = { - exitApp(): void, - addEventListener( - eventName: BackPressEventName, - handler: () => ?boolean - ): { remove: () => void, ... }, -}; -declare const BackHandler: TBackHandler; -declare export default typeof BackHandler; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/DevLoadingView.js 1`] = ` -"declare export default { - showMessage(message: string, type: \\"load\\" | \\"refresh\\"): void, - hide(): void, -}; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/DevSettings.js 1`] = ` -"declare let DevSettings: { - addMenuItem(title: string, handler: () => mixed): void, - reload(reason?: string): void, - onFastRefresh(): void, -}; -declare export default typeof DevSettings; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/DeviceInfo.js 1`] = ` -"export type { DeviceInfoConstants } from \\"./NativeDeviceInfo\\"; -declare export default typeof NativeDeviceInfo; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/Dimensions.js 1`] = ` -"export type { DimensionsPayload, DisplayMetrics, DisplayMetricsAndroid }; -export type ScaledSize = DisplayMetrics; -declare class Dimensions { - static get(dim: string): DisplayMetrics | DisplayMetricsAndroid; - static set(dims: $ReadOnly): void; - static addEventListener(type: \\"change\\", handler: Function): EventSubscription; -} -declare export default typeof Dimensions; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/FeatureDetection.js 1`] = ` -"declare export function isNativeFunction(f: Function): boolean; -declare export function hasNativeConstructor( - o: Object, - expectedName: string -): boolean; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/GlobalPerformanceLogger.js 1`] = ` -"declare const GlobalPerformanceLogger: IPerformanceLogger; -declare export default typeof GlobalPerformanceLogger; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/HMRClient.js 1`] = ` -"type LogLevel = - | \\"trace\\" - | \\"info\\" - | \\"warn\\" - | \\"error\\" - | \\"log\\" - | \\"group\\" - | \\"groupCollapsed\\" - | \\"groupEnd\\" - | \\"debug\\"; -export type HMRClientNativeInterface = { - enable(): void, - disable(): void, - registerBundle(requestUrl: string): void, - log(level: LogLevel, data: $ReadOnlyArray): void, - setup( - platform: string, - bundleEntry: string, - host: string, - port: number | string, - isEnabled: boolean, - scheme?: string - ): void, -}; -declare const HMRClient: HMRClientNativeInterface; -declare export default typeof HMRClient; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/HMRClientProdShim.js 1`] = ` -"declare const HMRClientProdShim: HMRClientNativeInterface; -declare export default typeof HMRClientProdShim; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/IPerformanceLogger.js 1`] = ` -"export type Timespan = { - startTime: number, - endTime?: number, - totalTime?: number, - startExtras?: Extras, - endExtras?: Extras, -}; -export type ExtraValue = number | string | boolean; -export type Extras = { [key: string]: ExtraValue }; -export interface IPerformanceLogger { - addTimespan( - key: string, - startTime: number, - endTime: number, - startExtras?: Extras, - endExtras?: Extras - ): void; - append(logger: IPerformanceLogger): void; - clear(): void; - clearCompleted(): void; - close(): void; - currentTimestamp(): number; - getExtras(): $ReadOnly<{ [key: string]: ?ExtraValue, ... }>; - getPoints(): $ReadOnly<{ [key: string]: ?number, ... }>; - getPointExtras(): $ReadOnly<{ [key: string]: ?Extras, ... }>; - getTimespans(): $ReadOnly<{ [key: string]: ?Timespan, ... }>; - hasTimespan(key: string): boolean; - isClosed(): boolean; - logEverything(): void; - markPoint(key: string, timestamp?: number, extras?: Extras): void; - removeExtra(key: string): ?ExtraValue; - setExtra(key: string, value: ExtraValue): void; - startTimespan(key: string, timestamp?: number, extras?: Extras): void; - stopTimespan(key: string, timestamp?: number, extras?: Extras): void; -} -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/NativeAppearance.js 1`] = ` -"export type * from \\"../../src/private/specs_DEPRECATED/modules/NativeAppearance\\"; -declare export default typeof NativeAppearance; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/NativeDevLoadingView.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeDevLoadingView\\"; -declare export default typeof NativeDevLoadingView; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/NativeDeviceInfo.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeDeviceInfo\\"; -export { default } from \\"../../src/private/specs_DEPRECATED/modules/NativeDeviceInfo\\"; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/NativePlatformConstantsAndroid.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativePlatformConstantsAndroid\\"; -declare export default typeof NativePlatformConstantsAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/NativePlatformConstantsIOS.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativePlatformConstantsIOS\\"; -declare export default typeof NativePlatformConstantsIOS; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/PerformanceLoggerContext.js 1`] = ` -"declare const PerformanceLoggerContext: React.Context; -declare export function usePerformanceLogger(): IPerformanceLogger; -declare export default typeof PerformanceLoggerContext; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/PixelRatio.js 1`] = ` -"declare class PixelRatio { - static get(): number; - static getFontScale(): number; - static getPixelSizeForLayoutSize(layoutSize: number): number; - static roundToNearestPixel(layoutSize: number): number; - static startDetecting(): void; -} -declare export default typeof PixelRatio; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/Platform.js 1`] = ` -"declare export default typeof Platform; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/Platform.js.flow 1`] = ` -"declare export default PlatformType; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/PlatformTypes.js 1`] = ` -"export type PlatformOSType = - | \\"ios\\" - | \\"android\\" - | \\"macos\\" - | \\"windows\\" - | \\"web\\" - | \\"native\\"; -type OptionalPlatformSelectSpec = { - [key in PlatformOSType]?: T, -}; -export type PlatformSelectSpec = - | { - ...OptionalPlatformSelectSpec, - default: T, - } - | OptionalPlatformSelectSpec; -type IOSPlatform = { - OS: \\"ios\\", - get Version(): string, - get constants(): { - forceTouchAvailable: boolean, - interfaceIdiom: string, - isTesting: boolean, - isDisableAnimations?: boolean, - osVersion: string, - reactNativeVersion: { - major: number, - minor: number, - patch: number, - prerelease: ?string, - }, - systemName: string, - isMacCatalyst?: boolean, - }, - get isPad(): boolean, - get isTV(): boolean, - get isVision(): boolean, - get isTesting(): boolean, - get isDisableAnimations(): boolean, - get isMacCatalyst(): boolean, - select: (spec: PlatformSelectSpec) => T, -}; -type AndroidPlatform = { - OS: \\"android\\", - get Version(): number, - get constants(): { - isTesting: boolean, - isDisableAnimations?: boolean, - reactNativeVersion: { - major: number, - minor: number, - patch: number, - prerelease: ?string, - }, - Version: number, - Release: string, - Serial: string, - Fingerprint: string, - Model: string, - ServerHost?: string, - uiMode: string, - Brand: string, - Manufacturer: string, - }, - get isTV(): boolean, - get isVision(): boolean, - get isTesting(): boolean, - get isDisableAnimations(): boolean, - select: (spec: PlatformSelectSpec) => T, -}; -type WindowsPlatform = { - OS: \\"windows\\", - get Version(): number, - get constants(): { - isTesting: boolean, - isDisableAnimations?: boolean, - reactNativeVersion: { - major: number, - minor: number, - patch: number, - prerelease: ?string, - }, - reactNativeWindowsVersion: { - major: number, - minor: number, - patch: number, - }, - osVersion: number, - }, - get isTesting(): boolean, - get isDisableAnimations(): boolean, - get isTV(): boolean, - select: (spec: PlatformSelectSpec) => T, -}; -type MacOSPlatform = { - OS: \\"macos\\", - get Version(): string, - get constants(): { - isTesting: boolean, - osVersion: string, - reactNativeVersion: { - major: number, - minor: number, - patch: number, - prerelease: ?number, - }, - systemName: string, - }, - get isTV(): boolean, - get isVision(): boolean, - get isTesting(): boolean, - get isDisableAnimations(): boolean, - select: (spec: PlatformSelectSpec) => T, -}; -type WebPlatform = { - OS: \\"web\\", - get Version(): void, - get constants(): { - reactNativeVersion: { - major: number, - minor: number, - patch: number, - prerelease: ?string, - }, - }, - get isTV(): boolean, - get isTesting(): boolean, - get isDisableAnimations(): boolean, - select: (spec: PlatformSelectSpec) => T, -}; -export type PlatformType = - | IOSPlatform - | AndroidPlatform - | WindowsPlatform - | MacOSPlatform - | WebPlatform; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/PolyfillFunctions.js 1`] = ` -"declare export function polyfillObjectProperty( - object: { ... }, - name: string, - getValue: () => T -): void; -declare export function polyfillGlobal( - name: string, - getValue: () => T -): void; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/RCTLog.js 1`] = ` -"declare let warningHandler: ?(...Array) => void; -declare const RCTLog: { - logIfNoNativeHook(level: string, ...args: Array): void, - logToConsole(level: string, ...args: Array): void, - setWarningHandler(handler: typeof warningHandler): void, -}; -declare export default typeof RCTLog; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/ReactNativeTestTools.js 1`] = ` -"export type ReactTestInstance = ReactTestRendererType[\\"root\\"]; -export type Predicate = (node: ReactTestInstance) => boolean; -export type ReactTestRendererJSON = ReturnType; -declare function byClickable(): Predicate; -declare function byTestID(testID: string): Predicate; -declare function byTextMatching(regex: RegExp): Predicate; -declare function enter(instance: ReactTestInstance, text: string): void; -declare function maximumDepthError( - tree: ReactTestRendererType, - maxDepthLimit: number -): ?string; -declare function expectNoConsoleWarn(): void; -declare function expectNoConsoleError(): void; -declare function expectRendersMatchingSnapshot( - name: string, - ComponentProvider: () => React.MixedElement, - unmockComponent: () => mixed -): void; -declare function maximumDepthOfJSON(node: ?ReactTestRendererJSON): number; -declare function renderAndEnforceStrictMode(element: React.Node): any; -declare function renderWithStrictMode( - element: React.Node -): ReactTestRendererType; -declare function tap(instance: ReactTestInstance): void; -declare function scrollToBottom(instance: ReactTestInstance): void; -declare function withMessage(fn: Predicate, message: string): Predicate; -export { byClickable }; -export { byTestID }; -export { byTextMatching }; -export { enter }; -export { expectNoConsoleWarn }; -export { expectNoConsoleError }; -export { expectRendersMatchingSnapshot }; -export { maximumDepthError }; -export { maximumDepthOfJSON }; -export { renderAndEnforceStrictMode }; -export { renderWithStrictMode }; -export { scrollToBottom }; -export { tap }; -export { withMessage }; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/SceneTracker.js 1`] = ` -"export type Scene = { name: string, [string]: mixed, ... }; -declare const SceneTracker: { - setActiveScene(scene: Scene): void, - getActiveScene(): Scene, - addActiveSceneChangedListener(callback: (scene: Scene) => void): { - remove: () => void, - ... - }, -}; -declare export default typeof SceneTracker; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/binaryToBase64.js 1`] = ` -"declare function binaryToBase64(data: ArrayBuffer | $ArrayBufferView): string; -declare export default typeof binaryToBase64; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/codegenNativeCommands.js 1`] = ` -"type NativeCommandsOptions = $ReadOnly<{ - supportedCommands: $ReadOnlyArray, -}>; -declare function codegenNativeCommands( - options: NativeCommandsOptions<$Keys> -): T; -declare export default typeof codegenNativeCommands; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/codegenNativeComponent.js 1`] = ` -"type NativeComponentOptions = $ReadOnly<{ - interfaceOnly?: boolean, - paperComponentName?: string, - paperComponentNameDeprecated?: string, - excludedPlatforms?: $ReadOnlyArray<\\"iOS\\" | \\"android\\">, -}>; -export type NativeComponentType = HostComponent; -declare function codegenNativeComponent( - componentName: string, - options?: NativeComponentOptions -): NativeComponentType; -declare export default typeof codegenNativeComponent; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/createPerformanceLogger.js 1`] = ` -"declare export const getCurrentTimestamp: () => number; -export type { Extras, ExtraValue, IPerformanceLogger, Timespan }; -declare export default function createPerformanceLogger(): IPerformanceLogger; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js 1`] = ` -"declare function deepFreezeAndThrowOnMutationInDev>( - object: T -): T; -declare export default typeof deepFreezeAndThrowOnMutationInDev; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/defineLazyObjectProperty.js 1`] = ` -"declare function defineLazyObjectProperty( - object: interface {}, - name: string, - descriptor: { - get: () => T, - enumerable?: boolean, - writable?: boolean, - ... - } -): void; -declare export default typeof defineLazyObjectProperty; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/differ/deepDiffer.js 1`] = ` -"type Options = { +unsafelyIgnoreFunctions?: boolean }; -declare function deepDiffer( - one: any, - two: any, - maxDepthOrOptions?: Options | number, - maybeOptions?: Options -): boolean; -declare export default typeof deepDiffer; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/differ/insetsDiffer.js 1`] = ` -"type Inset = { - top: ?number, - left: ?number, - right: ?number, - bottom: ?number, - ... -}; -declare function insetsDiffer(one: Inset, two: Inset): boolean; -declare export default typeof insetsDiffer; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/differ/matricesDiffer.js 1`] = ` -"declare function matricesDiffer( - one: ?Array, - two: ?Array -): boolean; -declare export default typeof matricesDiffer; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/differ/pointsDiffer.js 1`] = ` -"type Point = { - x: ?number, - y: ?number, - ... -}; -declare function pointsDiffer(one: ?Point, two: ?Point): boolean; -declare export default typeof pointsDiffer; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/differ/sizesDiffer.js 1`] = ` -"type Size = { width: ?number, height: ?number }; -declare function sizesDiffer(one: Size, two: Size): boolean; -declare export default typeof sizesDiffer; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/dismissKeyboard.js 1`] = ` -"declare function dismissKeyboard(): void; -declare export default typeof dismissKeyboard; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/logError.js 1`] = ` -"declare const logError: (...args: $ReadOnlyArray) => void; -declare export default typeof logError; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/mapWithSeparator.js 1`] = ` -"declare function mapWithSeparator( - items: Array, - itemRenderer: (item: TFrom, index: number, items: Array) => TTo, - spacerRenderer: (index: number) => TTo -): Array; -declare export default typeof mapWithSeparator; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/stringifySafe.js 1`] = ` -"declare export function createStringifySafeWithLimits(limits: { - maxDepth?: number, - maxStringLimit?: number, - maxArrayLimit?: number, - maxObjectKeysLimit?: number, -}): (mixed) => string; -declare const stringifySafe: (mixed) => string; -declare export default typeof stringifySafe; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/stringifyViewConfig.js 1`] = ` -"declare export default function stringifyViewConfig(viewConfig: any): string; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/useColorScheme.js 1`] = ` -"declare export default function useColorScheme(): ?ColorSchemeName; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/useMergeRefs.js 1`] = ` -"declare export default function useMergeRefs( - ...refs: $ReadOnlyArray> -): React.RefSetter; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/useRefEffect.js 1`] = ` -"type CallbackRef = (T) => mixed; -declare export default function useRefEffect( - effect: (TInstance) => (() => void) | void -): CallbackRef; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/useWindowDimensions.js 1`] = ` -"declare export default function useWindowDimensions(): - | DisplayMetrics - | DisplayMetricsAndroid; -" -`; - -exports[`public API should not change unintentionally Libraries/Utilities/warnOnce.js 1`] = ` -"declare function warnOnce(key: string, message: string): void; -declare export default typeof warnOnce; -" -`; - -exports[`public API should not change unintentionally Libraries/Vibration/NativeVibration.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeVibration\\"; -declare export default typeof NativeVibration; -" -`; - -exports[`public API should not change unintentionally Libraries/Vibration/Vibration.js 1`] = ` -"declare const Vibration: { - vibrate: (pattern?: number | Array, repeat?: boolean) => void, - cancel: () => void, -}; -declare export default typeof Vibration; -" -`; - -exports[`public API should not change unintentionally Libraries/WebSocket/NativeWebSocketModule.js 1`] = ` -"export * from \\"../../src/private/specs_DEPRECATED/modules/NativeWebSocketModule\\"; -declare export default typeof NativeWebSocketModule; -" -`; - -exports[`public API should not change unintentionally Libraries/WebSocket/WebSocket.js 1`] = ` -"type ArrayBufferView = - | Int8Array - | Uint8Array - | Uint8ClampedArray - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array - | Float32Array - | Float64Array - | DataView; -type BinaryType = \\"blob\\" | \\"arraybuffer\\"; -type WebSocketEventDefinitions = { - websocketOpen: [{ id: number, protocol: string }], - websocketClosed: [{ id: number, code: number, reason: string }], - websocketMessage: [ - | { type: \\"binary\\", id: number, data: string } - | { type: \\"text\\", id: number, data: string } - | { type: \\"blob\\", id: number, data: BlobData }, - ], - websocketFailed: [{ id: number, message: string }], -}; -declare class WebSocket extends EventTarget { - static CONNECTING: number; - static OPEN: number; - static CLOSING: number; - static CLOSED: number; - CONNECTING: number; - OPEN: number; - CLOSING: number; - CLOSED: number; - bufferedAmount: number; - extension: ?string; - protocol: ?string; - readyState: number; - url: ?string; - constructor( - url: string, - protocols: ?string | ?Array, - options: ?{ headers?: { origin?: string, ... }, ... } - ): void; - get binaryType(): ?BinaryType; - set binaryType(binaryType: BinaryType): void; - close(code?: number, reason?: string): void; - send(data: string | ArrayBuffer | ArrayBufferView | Blob): void; - ping(): void; - get onclose(): EventCallback | null; - set onclose(listener: ?EventCallback): void; - get onerror(): EventCallback | null; - set onerror(listener: ?EventCallback): void; - get onmessage(): EventCallback | null; - set onmessage(listener: ?EventCallback): void; - get onopen(): EventCallback | null; - set onopen(listener: ?EventCallback): void; -} -declare export default typeof WebSocket; -" -`; - -exports[`public API should not change unintentionally Libraries/WebSocket/WebSocketInterceptor.js 1`] = ` -"declare const WebSocketInterceptor: { - setCloseCallback( - callback: ?(number | null, string | null, number) => void - ): void, - setSendCallback(callback: ?(string | ArrayBuffer, number) => void): void, - setConnectCallback( - callback: ?(string, Array | null, Array, number) => void - ): void, - setOnOpenCallback(callback: ?(number) => void): void, - setOnMessageCallback(callback: ?(string | ArrayBuffer, number) => void): void, - setOnErrorCallback(callback: ?({ message: string }, number) => void): void, - setOnCloseCallback( - callback: ?({ code: number, reason: ?string }, number) => void - ): void, - isInterceptorEnabled(): boolean, - enableInterception(): void, - disableInterception(): void, -}; -declare export default typeof WebSocketInterceptor; -" -`; - -exports[`public API should not change unintentionally Libraries/promiseRejectionTrackingOptions.js 1`] = ` -"declare let rejectionTrackingOptions: $NonMaybeType[0]>; -declare export default typeof rejectionTrackingOptions; -" -`; - -exports[`public API should not change unintentionally Libraries/vendor/core/ErrorUtils.js 1`] = ` -"type ErrorHandler = (error: mixed, isFatal: boolean) => void; -type Fn, Return> = (...Args) => Return; -export type ErrorUtils = { - applyWithGuard, TOut>( - fun: Fn, - context?: mixed, - args?: ?TArgs, - unused_onError?: null, - unused_name?: ?string - ): ?TOut, - applyWithGuardIfNeeded, TOut>( - fun: Fn, - context?: mixed, - args?: ?TArgs - ): ?TOut, - getGlobalHandler(): ErrorHandler, - guard, TOut>( - fun: Fn, - name?: ?string, - context?: mixed - ): ?(...TArgs) => ?TOut, - inGuard(): boolean, - reportError(error: mixed): void, - reportFatalError(error: mixed): void, - setGlobalHandler(fun: ErrorHandler): void, -}; -declare export default ErrorUtils; -" -`; - -exports[`public API should not change unintentionally Libraries/vendor/emitter/EventEmitter.js 1`] = ` -"type UnsafeEventObject = Object; -export interface EventSubscription { - remove(): void; -} -export interface IEventEmitter< - TEventToArgsMap: $ReadOnly>>, -> { - addListener>( - eventType: TEvent, - listener: (...args: TEventToArgsMap[TEvent]) => mixed, - context?: mixed - ): EventSubscription; - emit>( - eventType: TEvent, - ...args: TEventToArgsMap[TEvent] - ): void; - removeAllListeners>(eventType?: ?TEvent): void; - listenerCount>(eventType: TEvent): number; -} -declare export default class EventEmitter< - TEventToArgsMap: $ReadOnly< - Record>, - > = $ReadOnly>>, -> implements IEventEmitter -{ - constructor(): void; - addListener>( - eventType: TEvent, - listener: (...args: TEventToArgsMap[TEvent]) => mixed, - context: mixed - ): EventSubscription; - emit>( - eventType: TEvent, - ...args: TEventToArgsMap[TEvent] - ): void; - removeAllListeners>(eventType?: ?TEvent): void; - listenerCount>(eventType: TEvent): number; -} -" -`; - -exports[`public API should not change unintentionally index.js.flow 1`] = ` -"export type { ActivityIndicatorProps } from \\"./Libraries/Components/ActivityIndicator/ActivityIndicator\\"; -export { default as ActivityIndicator } from \\"./Libraries/Components/ActivityIndicator/ActivityIndicator\\"; -export type { ButtonProps } from \\"./Libraries/Components/Button\\"; -export { default as Button } from \\"./Libraries/Components/Button\\"; -export type { - DrawerLayoutAndroidProps, - DrawerSlideEvent, -} from \\"./Libraries/Components/DrawerAndroid/DrawerLayoutAndroid\\"; -export { default as DrawerLayoutAndroid } from \\"./Libraries/Components/DrawerAndroid/DrawerLayoutAndroid\\"; -export type { FlatListProps } from \\"./Libraries/Lists/FlatList\\"; -export { default as FlatList } from \\"./Libraries/Lists/FlatList\\"; -export type { - ImageBackgroundProps, - ImageErrorEvent, - ImageLoadEvent, - ImageProgressEventIOS, - ImageProps, - ImagePropsAndroid, - ImagePropsBase, - ImagePropsIOS, - ImageResolvedAssetSource, - ImageSize, - ImageSourcePropType, -} from \\"./Libraries/Image/Image\\"; -export type { - ImageRequireSource, - ImageSource, - ImageURISource, -} from \\"./Libraries/Image/ImageSource\\"; -export { default as Image } from \\"./Libraries/Image/Image\\"; -export { default as ImageBackground } from \\"./Libraries/Image/ImageBackground\\"; -export type { InputAccessoryViewProps } from \\"./Libraries/Components/TextInput/InputAccessoryView\\"; -export { default as InputAccessoryView } from \\"./Libraries/Components/TextInput/InputAccessoryView\\"; -export type { KeyboardAvoidingViewProps } from \\"./Libraries/Components/Keyboard/KeyboardAvoidingView\\"; -export { default as KeyboardAvoidingView } from \\"./Libraries/Components/Keyboard/KeyboardAvoidingView\\"; -export type { LayoutConformanceProps } from \\"./Libraries/Components/LayoutConformance/LayoutConformance\\"; -export { default as experimental_LayoutConformance } from \\"./Libraries/Components/LayoutConformance/LayoutConformance\\"; -export type { - ModalBaseProps, - ModalProps, - ModalPropsAndroid, - ModalPropsIOS, -} from \\"./Libraries/Modal/Modal\\"; -export { default as Modal } from \\"./Libraries/Modal/Modal\\"; -export type { - PressableAndroidRippleConfig, - PressableProps, - PressableStateCallbackType, -} from \\"./Libraries/Components/Pressable/Pressable\\"; -export { default as Pressable } from \\"./Libraries/Components/Pressable/Pressable\\"; -export type { ProgressBarAndroidProps } from \\"./Libraries/Components/ProgressBarAndroid/ProgressBarAndroid\\"; -export { default as ProgressBarAndroid } from \\"./Libraries/Components/ProgressBarAndroid/ProgressBarAndroid\\"; -export type { - RefreshControlProps, - RefreshControlPropsAndroid, - RefreshControlPropsIOS, -} from \\"./Libraries/Components/RefreshControl/RefreshControl\\"; -export { default as RefreshControl } from \\"./Libraries/Components/RefreshControl/RefreshControl\\"; -export { default as SafeAreaView } from \\"./Libraries/Components/SafeAreaView/SafeAreaView\\"; -export type { - ScrollViewImperativeMethods, - ScrollViewScrollToOptions, - ScrollResponderType, - ScrollViewProps, - ScrollViewPropsAndroid, - ScrollViewPropsIOS, -} from \\"./Libraries/Components/ScrollView/ScrollView\\"; -export { default as ScrollView } from \\"./Libraries/Components/ScrollView/ScrollView\\"; -export type { - SectionListProps, - SectionListRenderItem, - SectionListRenderItemInfo, - SectionListData, -} from \\"./Libraries/Lists/SectionList\\"; -export { default as SectionList } from \\"./Libraries/Lists/SectionList\\"; -export type { - StatusBarAnimation, - StatusBarProps, - StatusBarStyle, -} from \\"./Libraries/Components/StatusBar/StatusBar\\"; -export { default as StatusBar } from \\"./Libraries/Components/StatusBar/StatusBar\\"; -export type { - SwitchChangeEvent, - SwitchProps, -} from \\"./Libraries/Components/Switch/Switch\\"; -export { default as Switch } from \\"./Libraries/Components/Switch/Switch\\"; -export type { TextProps } from \\"./Libraries/Text/Text\\"; -export { default as Text } from \\"./Libraries/Text/Text\\"; -export type { - AutoCapitalize, - EnterKeyHintTypeOptions, - KeyboardTypeOptions, - InputModeOptions, - TextContentType, - TextInputAndroidProps, - TextInputIOSProps, - TextInputProps, - TextInputChangeEvent, - TextInputContentSizeChangeEvent, - TextInputEndEditingEvent, - TextInputFocusEvent, - TextInputKeyPressEvent, - TextInputSelectionChangeEvent, - TextInputSubmitEditingEvent, - ReturnKeyTypeOptions, - SubmitBehavior, -} from \\"./Libraries/Components/TextInput/TextInput\\"; -export { default as TextInput } from \\"./Libraries/Components/TextInput/TextInput\\"; -export { default as Touchable } from \\"./Libraries/Components/Touchable/Touchable\\"; -export type { TouchableHighlightProps } from \\"./Libraries/Components/Touchable/TouchableHighlight\\"; -export { default as TouchableHighlight } from \\"./Libraries/Components/Touchable/TouchableHighlight\\"; -export type { TouchableNativeFeedbackProps } from \\"./Libraries/Components/Touchable/TouchableNativeFeedback\\"; -export { default as TouchableNativeFeedback } from \\"./Libraries/Components/Touchable/TouchableNativeFeedback\\"; -export type { TouchableOpacityProps } from \\"./Libraries/Components/Touchable/TouchableOpacity\\"; -export { default as TouchableOpacity } from \\"./Libraries/Components/Touchable/TouchableOpacity\\"; -export type { TouchableWithoutFeedbackProps } from \\"./Libraries/Components/Touchable/TouchableWithoutFeedback\\"; -export { default as TouchableWithoutFeedback } from \\"./Libraries/Components/Touchable/TouchableWithoutFeedback\\"; -export type { - AccessibilityActionEvent, - AccessibilityProps, - AccessibilityRole, - AccessibilityState, - AccessibilityValue, - Role, -} from \\"./Libraries/Components/View/ViewAccessibility\\"; -export type { - GestureResponderHandlers, - TVViewPropsIOS, - ViewProps, - ViewPropsAndroid, - ViewPropsIOS, -} from \\"./Libraries/Components/View/ViewPropTypes\\"; -export { default as View } from \\"./Libraries/Components/View/View\\"; -export type { - ListRenderItemInfo, - ListRenderItem, - Separators, - VirtualizedListProps, -} from \\"./Libraries/Lists/VirtualizedList\\"; -export { default as VirtualizedList } from \\"./Libraries/Lists/VirtualizedList\\"; -export type { - ScrollToLocationParamsType, - SectionBase, - VirtualizedSectionListProps, -} from \\"./Libraries/Lists/VirtualizedSectionList\\"; -export { default as VirtualizedSectionList } from \\"./Libraries/Lists/VirtualizedSectionList\\"; -export { default as AccessibilityInfo } from \\"./Libraries/Components/AccessibilityInfo/AccessibilityInfo\\"; -export type { - ActionSheetIOSOptions, - ShareActionSheetIOSOptions, - ShareActionSheetError, -} from \\"./Libraries/ActionSheetIOS/ActionSheetIOS\\"; -export { default as ActionSheetIOS } from \\"./Libraries/ActionSheetIOS/ActionSheetIOS\\"; -export type { - AlertType, - AlertButtonStyle, - AlertButton, - AlertOptions, -} from \\"./Libraries/Alert/Alert\\"; -export { default as Alert } from \\"./Libraries/Alert/Alert\\"; -export { default as Animated } from \\"./Libraries/Animated/Animated\\"; -export * as Appearance from \\"./Libraries/Utilities/Appearance\\"; -export type { - TaskProvider, - ComponentProvider, - ComponentProviderInstrumentationHook, - AppConfig, - Runnable, - Runnables, - Registry, - WrapperComponentProvider, - RootViewStyleProvider, -} from \\"./Libraries/ReactNative/AppRegistry\\"; -export { AppRegistry } from \\"./Libraries/ReactNative/AppRegistry\\"; -export type { - AppStateStatus, - AppStateEvent, -} from \\"./Libraries/AppState/AppState\\"; -export { default as AppState } from \\"./Libraries/AppState/AppState\\"; -export type { BackPressEventName } from \\"./Libraries/Utilities/BackHandler\\"; -export { default as BackHandler } from \\"./Libraries/Utilities/BackHandler\\"; -export { default as Clipboard } from \\"./Libraries/Components/Clipboard/Clipboard\\"; -export { default as codegenNativeComponent } from \\"./Libraries/Utilities/codegenNativeComponent\\"; -export { default as codegenNativeCommands } from \\"./Libraries/Utilities/codegenNativeCommands\\"; -export { default as DeviceEventEmitter } from \\"./Libraries/EventEmitter/RCTDeviceEventEmitter\\"; -export type { DeviceInfoConstants } from \\"./Libraries/Utilities/DeviceInfo\\"; -export { default as DeviceInfo } from \\"./Libraries/Utilities/DeviceInfo\\"; -export { default as DevMenu } from \\"./src/private/devsupport/devmenu/DevMenu\\"; -export { default as DevSettings } from \\"./Libraries/Utilities/DevSettings\\"; -export type { - DimensionsPayload, - DisplayMetrics, - DisplayMetricsAndroid, - ScaledSize, -} from \\"./Libraries/Utilities/Dimensions\\"; -export { default as Dimensions } from \\"./Libraries/Utilities/Dimensions\\"; -export type { DynamicColorIOSTuple } from \\"./Libraries/StyleSheet/PlatformColorValueTypesIOS\\"; -export { DynamicColorIOS } from \\"./Libraries/StyleSheet/PlatformColorValueTypesIOS\\"; -export type { EasingFunction } from \\"./Libraries/Animated/Easing\\"; -export { default as Easing } from \\"./Libraries/Animated/Easing\\"; -export { findNodeHandle } from \\"./Libraries/ReactNative/RendererProxy\\"; -export { default as I18nManager } from \\"./Libraries/ReactNative/I18nManager\\"; -export type { - Handle, - PromiseTask, - SimpleTask, -} from \\"./Libraries/Interaction/InteractionManager\\"; -export { default as InteractionManager } from \\"./Libraries/Interaction/InteractionManager\\"; -export type { - AndroidKeyboardEvent, - IOSKeyboardEvent, - KeyboardEvent, - KeyboardEventEasing, - KeyboardEventName, - KeyboardMetrics, -} from \\"./Libraries/Components/Keyboard/Keyboard\\"; -export { default as Keyboard } from \\"./Libraries/Components/Keyboard/Keyboard\\"; -export type { - LayoutAnimationAnim, - LayoutAnimationConfig, - LayoutAnimationProperties, - LayoutAnimationProperty, - LayoutAnimationType, - LayoutAnimationTypes, -} from \\"./Libraries/LayoutAnimation/LayoutAnimation\\"; -export { default as LayoutAnimation } from \\"./Libraries/LayoutAnimation/LayoutAnimation\\"; -export { default as Linking } from \\"./Libraries/Linking/Linking\\"; -export type { - ExtendedExceptionData, - IgnorePattern, - LogData, -} from \\"./Libraries/LogBox/LogBox\\"; -export { default as LogBox } from \\"./Libraries/LogBox/LogBox\\"; -export { default as NativeAppEventEmitter } from \\"./Libraries/EventEmitter/RCTNativeAppEventEmitter\\"; -export { default as NativeDialogManagerAndroid } from \\"./Libraries/NativeModules/specs/NativeDialogManagerAndroid\\"; -export type { - EventSubscription, - EmitterSubscription, - NativeEventSubscription, -} from \\"./Libraries/EventEmitter/NativeEventEmitter\\"; -export { default as NativeEventEmitter } from \\"./Libraries/EventEmitter/NativeEventEmitter\\"; -export { default as NativeModules } from \\"./Libraries/BatchedBridge/NativeModules\\"; -export { default as Networking } from \\"./Libraries/Network/RCTNetworking\\"; -export type { - PanResponderCallbacks, - PanResponderGestureState, - PanResponderInstance, -} from \\"./Libraries/Interaction/PanResponder\\"; -export { default as PanResponder } from \\"./Libraries/Interaction/PanResponder\\"; -export type { - Permission, - PermissionStatus, - Rationale, -} from \\"./Libraries/PermissionsAndroid/PermissionsAndroid\\"; -export { default as PermissionsAndroid } from \\"./Libraries/PermissionsAndroid/PermissionsAndroid\\"; -export { default as PixelRatio } from \\"./Libraries/Utilities/PixelRatio\\"; -export type { - PlatformOSType, - PlatformSelectSpec, -} from \\"./Libraries/Utilities/PlatformTypes\\"; -export { default as Platform } from \\"./Libraries/Utilities/Platform\\"; -export { PlatformColor } from \\"./Libraries/StyleSheet/PlatformColorValueTypes\\"; -export type { - PushNotificationEventName, - PushNotificationPermissions, -} from \\"./Libraries/PushNotificationIOS/PushNotificationIOS\\"; -export { default as PushNotificationIOS } from \\"./Libraries/PushNotificationIOS/PushNotificationIOS\\"; -export type { ProcessedColorValue } from \\"./Libraries/StyleSheet/processColor\\"; -export { default as processColor } from \\"./Libraries/StyleSheet/processColor\\"; -export { default as registerCallableModule } from \\"./Libraries/Core/registerCallableModule\\"; -export { default as requireNativeComponent } from \\"./Libraries/ReactNative/requireNativeComponent\\"; -export type { RootTag } from \\"./Libraries/ReactNative/RootTag\\"; -export { RootTagContext } from \\"./Libraries/ReactNative/RootTag\\"; -export { default as Settings } from \\"./Libraries/Settings/Settings\\"; -export type { - ShareAction, - ShareContent, - ShareOptions, -} from \\"./Libraries/Share/Share\\"; -export { default as Share } from \\"./Libraries/Share/Share\\"; -export type { - ColorValue, - ImageStyle, - FilterFunction, - FontVariant, - NativeColorValue, - OpaqueColorValue, - StyleProp, - TextStyle, - TransformsStyle, - ViewStyle, -} from \\"./Libraries/StyleSheet/StyleSheet\\"; -export type { - BoxShadowValue, - CursorValue, - DimensionValue, - DropShadowValue, - EdgeInsetsValue, - PointValue, -} from \\"./Libraries/StyleSheet/StyleSheetTypes\\"; -export type { Insets } from \\"./Libraries/StyleSheet/Rect\\"; -export { default as StyleSheet } from \\"./Libraries/StyleSheet/StyleSheet\\"; -export * as Systrace from \\"./Libraries/Performance/Systrace\\"; -export { default as ToastAndroid } from \\"./Libraries/Components/ToastAndroid/ToastAndroid\\"; -export * as TurboModuleRegistry from \\"./Libraries/TurboModule/TurboModuleRegistry\\"; -export { default as UIManager } from \\"./Libraries/ReactNative/UIManager\\"; -export { unstable_batchedUpdates } from \\"./Libraries/ReactNative/RendererProxy\\"; -export { default as useAnimatedValue } from \\"./Libraries/Animated/useAnimatedValue\\"; -export { default as useColorScheme } from \\"./Libraries/Utilities/useColorScheme\\"; -export { default as useWindowDimensions } from \\"./Libraries/Utilities/useWindowDimensions\\"; -export { default as UTFSequence } from \\"./Libraries/UTFSequence\\"; -export { default as Vibration } from \\"./Libraries/Vibration/Vibration\\"; -export type { - BlurEvent, - FocusEvent, - GestureResponderEvent, - LayoutChangeEvent, - LayoutRectangle, - MouseEvent, - PointerEvent, - NativeMouseEvent, - NativePointerEvent, - NativeScrollEvent, - NativeSyntheticEvent, - NativeTouchEvent, - NativeUIEvent, - ResponderSyntheticEvent, - ScrollEvent, - TargetedEvent, - TextLayoutEvent, -} from \\"./Libraries/Types/CoreEventTypes\\"; -export type { TurboModule } from \\"./Libraries/TurboModule/RCTExport\\"; -export type * from \\"./Libraries/Types/CodegenTypesNamespace\\"; -export type { - HostInstance, - NativeMethods, - NativeMethodsMixin, - MeasureInWindowOnSuccessCallback, - MeasureLayoutOnSuccessCallback, - MeasureOnSuccessCallback, -} from \\"./src/private/types/HostInstance\\"; -export type { HostComponent } from \\"./src/private/types/HostComponent\\"; -export type { ColorSchemeName } from \\"./src/private/specs_DEPRECATED/modules/NativeAppearance\\"; -export type { ErrorUtils } from \\"./Libraries/vendor/core/ErrorUtils\\"; -export type { - PublicRootInstance, - PublicTextInstance, -} from \\"./Libraries/ReactPrivate/ReactNativePrivateInterface\\"; -export { - default as unstable_VirtualView, - VirtualViewMode, -} from \\"./src/private/components/virtualview/VirtualView\\"; -export type { ModeChangeEvent } from \\"./src/private/components/virtualview/VirtualView\\"; -" -`; - -exports[`public API should not change unintentionally src/private/setup/setUpDOM.js 1`] = ` -"declare export default function setUpDOM(): void; -" -`; - -exports[`public API should not change unintentionally src/private/setup/setUpDefaultReactNativeEnvironment.js 1`] = ` -"declare export default function setUpDefaltReactNativeEnvironment( - enableDeveloperTools?: boolean -): void; -" -`; - -exports[`public API should not change unintentionally src/private/setup/setUpIntersectionObserver.js 1`] = ` -"declare export default function setUpIntersectionObserver(): void; -" -`; - -exports[`public API should not change unintentionally src/private/setup/setUpMutationObserver.js 1`] = ` -"declare export default function setUpMutationObserver(): void; -" -`; - -exports[`public API should not change unintentionally src/private/setup/setUpPerformanceObserver.js 1`] = ` -"declare export default function setUpPerformanceObserver(): void; -" -`; - -exports[`public API should not change unintentionally src/private/types/HostComponent.js 1`] = ` -"export type HostComponent = component( - ref?: React.RefSetter, - ...Config -); -" -`; - -exports[`public API should not change unintentionally src/private/types/HostInstance.js 1`] = ` -"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; -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; -export type NativeMethods = LegacyHostInstanceMethods; -export type NativeMethodsMixin = LegacyHostInstanceMethods; -" -`; - -exports[`public API should not change unintentionally src/private/webapis/dom/nodes/ReactNativeDocument.js 1`] = ` -"declare export default class ReactNativeDocument extends ReadOnlyNode { - constructor( - rootTag: RootTag, - instanceHandle: ReactNativeDocumentInstanceHandle - ): void; - get childElementCount(): number; - get children(): HTMLCollection; - get documentElement(): ReactNativeElement; - get firstElementChild(): ReadOnlyElement | null; - get lastElementChild(): ReadOnlyElement | null; - get nodeName(): string; - get nodeType(): number; - get nodeValue(): null; - get textContent(): null; -} -declare export function createReactNativeDocument( - rootTag: RootTag -): ReactNativeDocument; -" -`; - -exports[`public API should not change unintentionally src/private/webapis/dom/nodes/ReactNativeElement.js 1`] = ` -"declare class ReactNativeElement - extends ReadOnlyElement - implements NativeMethods -{ - constructor( - tag: number, - viewConfig: ViewConfig, - instanceHandle: InstanceHandle, - ownerDocument: ReactNativeDocument - ): void; - get offsetHeight(): number; - get offsetLeft(): number; - get offsetParent(): ReadOnlyElement | null; - get offsetTop(): number; - get offsetWidth(): number; - blur(): void; - focus(): void; - measure(callback: MeasureOnSuccessCallback): void; - measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; - measureLayout( - relativeToNativeNode: number | HostInstance, - onSuccess: MeasureLayoutOnSuccessCallback, - onFail?: () => void - ): void; - setNativeProps(nativeProps: { ... }): void; -} -declare export default typeof ReactNativeElement; -" -`; - -exports[`public API should not change unintentionally src/private/webapis/dom/nodes/ReadOnlyCharacterData.js 1`] = ` -"declare export default class ReadOnlyCharacterData extends ReadOnlyNode { - get nextElementSibling(): ReadOnlyElement | null; - get previousElementSibling(): ReadOnlyElement | null; - get data(): string; - get length(): number; - get textContent(): string; - get nodeValue(): string; - substringData(offset: number, count: number): string; -} -" -`; - -exports[`public API should not change unintentionally src/private/webapis/dom/nodes/ReadOnlyElement.js 1`] = ` -"declare export default class ReadOnlyElement extends ReadOnlyNode { - get childElementCount(): number; - get children(): HTMLCollection; - get clientHeight(): number; - get clientLeft(): number; - get clientTop(): number; - get clientWidth(): number; - get firstElementChild(): ReadOnlyElement | null; - get id(): string; - get lastElementChild(): ReadOnlyElement | null; - get nextElementSibling(): ReadOnlyElement | null; - get nodeName(): string; - get nodeType(): number; - get nodeValue(): string | null; - set nodeValue(value: string): void; - get previousElementSibling(): ReadOnlyElement | null; - get scrollHeight(): number; - get scrollLeft(): number; - get scrollTop(): number; - get scrollWidth(): number; - get tagName(): string; - get textContent(): string; - getBoundingClientRect(): DOMRect; - hasPointerCapture(pointerId: number): boolean; - setPointerCapture(pointerId: number): void; - releasePointerCapture(pointerId: number): void; -} -declare export function getBoundingClientRect( - element: ReadOnlyElement, - $$PARAM_1$$: { includeTransform: boolean } -): DOMRect; -" -`; - -exports[`public API should not change unintentionally src/private/webapis/dom/nodes/ReadOnlyNode.js 1`] = ` -"declare export default class ReadOnlyNode { - constructor( - instanceHandle: InstanceHandle, - ownerDocument: ReactNativeDocument | null - ): void; - get childNodes(): NodeList; - get firstChild(): ReadOnlyNode | null; - get isConnected(): boolean; - get lastChild(): ReadOnlyNode | null; - get nextSibling(): ReadOnlyNode | null; - get nodeName(): string; - get nodeType(): number; - get nodeValue(): string | null; - get ownerDocument(): ReactNativeDocument | null; - get parentElement(): ReadOnlyElement | null; - get parentNode(): ReadOnlyNode | null; - get previousSibling(): ReadOnlyNode | null; - get textContent(): string; - compareDocumentPosition(otherNode: ReadOnlyNode): number; - contains(otherNode: ReadOnlyNode): boolean; - getRootNode(): ReadOnlyNode; - hasChildNodes(): boolean; - static ELEMENT_NODE: number; - static ATTRIBUTE_NODE: number; - static TEXT_NODE: number; - static CDATA_SECTION_NODE: number; - static ENTITY_REFERENCE_NODE: number; - static ENTITY_NODE: number; - static PROCESSING_INSTRUCTION_NODE: number; - static COMMENT_NODE: number; - static DOCUMENT_NODE: number; - static DOCUMENT_TYPE_NODE: number; - static DOCUMENT_FRAGMENT_NODE: number; - static NOTATION_NODE: number; - static DOCUMENT_POSITION_DISCONNECTED: number; - static DOCUMENT_POSITION_PRECEDING: number; - static DOCUMENT_POSITION_FOLLOWING: number; - static DOCUMENT_POSITION_CONTAINS: number; - static DOCUMENT_POSITION_CONTAINED_BY: number; - static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number; -} -declare export function getChildNodes( - node: ReadOnlyNode -): $ReadOnlyArray; -" -`; - -exports[`public API should not change unintentionally src/private/webapis/dom/nodes/ReadOnlyText.js 1`] = ` -"declare export default class ReadOnlyText extends ReadOnlyCharacterData { - get nodeName(): string; - get nodeType(): number; -} -" -`; - -exports[`public API should not change unintentionally src/private/webapis/intersectionobserver/IntersectionObserver.js 1`] = ` -"export type IntersectionObserverCallback = ( - entries: Array, - observer: IntersectionObserver -) => mixed; -export interface IntersectionObserverInit { - root?: ?ReactNativeElement; - threshold?: number | $ReadOnlyArray; - rnRootThreshold?: number | $ReadOnlyArray; -} -declare export default class IntersectionObserver { - constructor( - callback: IntersectionObserverCallback, - options?: IntersectionObserverInit - ): void; - get root(): ReactNativeElement | null; - get rootMargin(): string; - get thresholds(): $ReadOnlyArray; - get rnRootThresholds(): $ReadOnlyArray | null; - observe(target: ReactNativeElement): void; - unobserve(target: ReactNativeElement): void; - disconnect(): void; -} -" -`; - -exports[`public API should not change unintentionally src/private/webapis/intersectionobserver/IntersectionObserverEntry.js 1`] = ` -"declare export default class IntersectionObserverEntry { - constructor( - nativeEntry: NativeIntersectionObserverEntry, - target: ReactNativeElement - ): void; - get boundingClientRect(): DOMRectReadOnly; - get intersectionRatio(): number; - get rnRootIntersectionRatio(): number; - get intersectionRect(): DOMRectReadOnly; - get isIntersecting(): boolean; - get rootBounds(): DOMRectReadOnly; - get target(): ReactNativeElement; - get time(): DOMHighResTimeStamp; -} -declare export function createIntersectionObserverEntry( - entry: NativeIntersectionObserverEntry, - target: ReactNativeElement -): IntersectionObserverEntry; -" -`; - -exports[`public API should not change unintentionally src/private/webapis/mutationobserver/MutationObserver.js 1`] = ` -"export type MutationObserverCallback = ( - mutationRecords: $ReadOnlyArray, - observer: MutationObserver -) => mixed; -export interface MutationObserverInit { - +subtree?: boolean; - +childList: true; - +attributes?: boolean; - +attributeFilter?: $ReadOnlyArray; - +attributeOldValue?: boolean; - +characterData?: boolean; - +characterDataOldValue?: boolean; -} -declare export default class MutationObserver { - constructor(callback: MutationObserverCallback): void; - observe(target: ReactNativeElement, options?: MutationObserverInit): void; - disconnect(): void; -} -" -`; - -exports[`public API should not change unintentionally src/private/webapis/mutationobserver/MutationRecord.js 1`] = ` -"export type MutationType = \\"attributes\\" | \\"characterData\\" | \\"childList\\"; -declare export default class MutationRecord { - constructor(nativeRecord: NativeMutationRecord): void; - get addedNodes(): NodeList; - get attributeName(): string | null; - get nextSibling(): ReadOnlyNode | null; - get oldValue(): mixed | null; - get previousSibling(): ReadOnlyNode | null; - get removedNodes(): NodeList; - get target(): ReactNativeElement; - get type(): MutationType; -} -declare export function createMutationRecord( - entry: NativeMutationRecord -): MutationRecord; -" -`; - -exports[`public API should not change unintentionally src/private/webapis/performance/EventTiming.js 1`] = ` -"export type PerformanceEventTimingJSON = { - ...PerformanceEntryJSON, - processingStart: DOMHighResTimeStamp, - processingEnd: DOMHighResTimeStamp, - interactionId: number, - ... -}; -declare export class PerformanceEventTiming extends PerformanceEntry { - constructor(init: { - name: string, - startTime?: DOMHighResTimeStamp, - duration?: DOMHighResTimeStamp, - processingStart?: DOMHighResTimeStamp, - processingEnd?: DOMHighResTimeStamp, - interactionId?: number, - }): void; - get processingStart(): DOMHighResTimeStamp; - get processingEnd(): DOMHighResTimeStamp; - get interactionId(): number; - toJSON(): PerformanceEventTimingJSON; -} -type EventCountsForEachCallbackType = - | (() => void) - | ((value: number) => void) - | ((value: number, key: string) => void) - | ((value: number, key: string, map: Map) => void); -declare export class EventCounts { - get size(): number; - entries(): Iterator<[string, number]>; - forEach(callback: EventCountsForEachCallbackType): void; - get(key: string): ?number; - has(key: string): boolean; - keys(): Iterator; - values(): Iterator; -} -" -`; - -exports[`public API should not change unintentionally src/private/webapis/performance/LongTasks.js 1`] = ` -"export type PerformanceLongTaskTimingJSON = { - ...PerformanceEntryJSON, - attribution: $ReadOnlyArray, - ... -}; -declare export class TaskAttributionTiming extends PerformanceEntry {} -declare export class PerformanceLongTaskTiming extends PerformanceEntry { - get attribution(): $ReadOnlyArray; - toJSON(): PerformanceLongTaskTimingJSON; -} -" -`; - -exports[`public API should not change unintentionally src/private/webapis/performance/MemoryInfo.js 1`] = ` -"type MemoryInfoLike = { - jsHeapSizeLimit: ?number, - totalJSHeapSize: ?number, - usedJSHeapSize: ?number, -}; -declare export default class MemoryInfo { - constructor(memoryInfo: ?MemoryInfoLike): void; - get jsHeapSizeLimit(): ?number; - get totalJSHeapSize(): ?number; - get usedJSHeapSize(): ?number; -} -" -`; - -exports[`public API should not change unintentionally src/private/webapis/performance/Performance.js 1`] = ` -"export type PerformanceMeasureOptions = { - detail?: DetailType, - start?: DOMHighResTimeStamp, - duration?: DOMHighResTimeStamp, - end?: DOMHighResTimeStamp, -}; -declare export default class Performance { - eventCounts: EventCounts; - get memory(): MemoryInfo; - get rnStartupTiming(): ReactNativeStartupTiming; - mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; - clearMarks(markName?: string): void; - measure( - measureName: string, - startMarkOrOptions?: string | PerformanceMeasureOptions, - endMark?: string - ): PerformanceMeasure; - clearMeasures(measureName?: string): void; - now: () => DOMHighResTimeStamp; - getEntries(): PerformanceEntryList; - getEntriesByType(entryType: PerformanceEntryType): PerformanceEntryList; - getEntriesByName( - entryName: string, - entryType?: PerformanceEntryType - ): PerformanceEntryList; -} -" -`; - -exports[`public API should not change unintentionally src/private/webapis/performance/PerformanceEntry.js 1`] = ` -"export type DOMHighResTimeStamp = number; -export type PerformanceEntryType = - | \\"mark\\" - | \\"measure\\" - | \\"event\\" - | \\"longtask\\" - | \\"resource\\"; -export type PerformanceEntryJSON = { - name: string, - entryType: PerformanceEntryType, - startTime: DOMHighResTimeStamp, - duration: DOMHighResTimeStamp, - ... -}; -declare export class PerformanceEntry { - constructor(init: { - name: string, - entryType: PerformanceEntryType, - startTime: DOMHighResTimeStamp, - duration: DOMHighResTimeStamp, - }): void; - get name(): string; - get entryType(): PerformanceEntryType; - get startTime(): DOMHighResTimeStamp; - get duration(): DOMHighResTimeStamp; - toJSON(): PerformanceEntryJSON; -} -export type PerformanceEntryList = $ReadOnlyArray; -" -`; - -exports[`public API should not change unintentionally src/private/webapis/performance/PerformanceObserver.js 1`] = ` -"export { PerformanceEntry } from \\"./PerformanceEntry\\"; -declare export class PerformanceObserverEntryList { - constructor(entries: PerformanceEntryList): void; - getEntries(): PerformanceEntryList; - getEntriesByType(type: PerformanceEntryType): PerformanceEntryList; - getEntriesByName( - name: string, - type?: PerformanceEntryType - ): PerformanceEntryList; -} -export type PerformanceObserverCallbackOptions = { - droppedEntriesCount: number, -}; -export type PerformanceObserverCallback = ( - list: PerformanceObserverEntryList, - observer: PerformanceObserver, - options?: PerformanceObserverCallbackOptions -) => void; -export interface PerformanceObserverInit { - +entryTypes?: Array; - +type?: PerformanceEntryType; - +buffered?: boolean; - +durationThreshold?: DOMHighResTimeStamp; -} -declare export class PerformanceObserver { - constructor(callback: PerformanceObserverCallback): void; - observe(options: PerformanceObserverInit): void; - disconnect(): void; - static supportedEntryTypes: $ReadOnlyArray; -} -export { PerformanceEventTiming }; -" -`; - -exports[`public API should not change unintentionally src/private/webapis/performance/ReactNativeStartupTiming.js 1`] = ` -"type ReactNativeStartupTimingLike = { - startTime: ?number, - endTime: ?number, - initializeRuntimeStart: ?number, - initializeRuntimeEnd: ?number, - executeJavaScriptBundleEntryPointStart: ?number, - executeJavaScriptBundleEntryPointEnd: ?number, -}; -declare export default class ReactNativeStartupTiming { - constructor(startUpTiming: ?ReactNativeStartupTimingLike): void; - get startTime(): ?number; - get endTime(): ?number; - get initializeRuntimeStart(): ?number; - get initializeRuntimeEnd(): ?number; - get executeJavaScriptBundleEntryPointStart(): ?number; - get executeJavaScriptBundleEntryPointEnd(): ?number; -} -" -`; - -exports[`public API should not change unintentionally src/private/webapis/performance/UserTiming.js 1`] = ` -"export type DetailType = mixed; -export type PerformanceMarkOptions = { - detail?: DetailType, - startTime?: DOMHighResTimeStamp, -}; -export type TimeStampOrName = DOMHighResTimeStamp | string; -export type PerformanceMeasureInit = { - detail?: DetailType, - startTime: DOMHighResTimeStamp, - duration: DOMHighResTimeStamp, -}; -declare export class PerformanceMark extends PerformanceEntry { - constructor(markName: string, markOptions?: PerformanceMarkOptions): void; - get detail(): DetailType; -} -declare export class PerformanceMeasure extends PerformanceEntry { - constructor( - measureName: string, - measureOptions: PerformanceMeasureInit - ): void; - get detail(): DetailType; -} -" -`; diff --git a/packages/react-native/Libraries/__tests__/public-api-test.js b/packages/react-native/Libraries/__tests__/public-api-test.js deleted file mode 100644 index 88df509ec242ce..00000000000000 --- a/packages/react-native/Libraries/__tests__/public-api-test.js +++ /dev/null @@ -1,142 +0,0 @@ -/** - * 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. - * - * @flow - * @format - */ - -import type {TransformVisitor} from 'hermes-transform'; - -const { - visitors: stripPrivateProperties, -} = require('../../../../scripts/build-types/transforms/flow/stripPrivateProperties'); -const translate = require('flow-api-translator'); -const {existsSync, promises: fs} = require('fs'); -const glob = require('glob'); -const {transform} = require('hermes-transform'); -const path = require('path'); - -const PACKAGE_ROOT = path.resolve(__dirname, '../../'); -const SHARED_PATTERNS = [ - '**/__{tests,mocks,fixtures,flowtests}__/**', - '**/*.android.js', - '**/*.ios.js', - '**/*.fb.js', - '**/*.macos.js', - '**/*.windows.js', -]; - -const JS_LIBRARIES_FILES_PATTERN = 'Libraries/**/*.{js,flow}'; -const JS_LIBRARIES_FILES_IGNORE_PATTERNS = [ - ...SHARED_PATTERNS, - 'Libraries/Core/setUp*', - // Non source files - 'Libraries/Renderer/implementations/**', - 'Libraries/Renderer/shims/**', - // ReactNativePrivateInterface - 'Libraries/ReactPrivate/**', -]; -const JS_PRIVATE_FILES_INCLUDE_PATTERNS = [ - 'setup/**/*.js', - 'specs/**/*.js', - 'types/**/*.js', - 'webapis/dom/geometry/*.js', - 'webapis/dom/nodes/*.js', - 'webapis/dom/oldstylecollections/*.js', - 'webapis/intersectionobserver/*.js', - 'webapis/mutationobserver/*.js', - 'webapis/performance/*.js', -]; -const JS_PRIVATE_FILES_IGNORE_PATTERNS = SHARED_PATTERNS; - -const sourceFiles = [ - 'index.js.flow', - ...glob.sync(JS_LIBRARIES_FILES_PATTERN, { - cwd: PACKAGE_ROOT, - ignore: JS_LIBRARIES_FILES_IGNORE_PATTERNS, - nodir: true, - }), - ...JS_PRIVATE_FILES_INCLUDE_PATTERNS.flatMap(srcPrivateSubpath => - glob.sync(path.join('src', 'private', srcPrivateSubpath), { - cwd: PACKAGE_ROOT, - ignore: JS_PRIVATE_FILES_IGNORE_PATTERNS, - nodir: true, - }), - ), -]; - -describe('public API', () => { - describe('should not change unintentionally', () => { - test.each(sourceFiles)('%s', async (file: string) => { - const source = await fs.readFile(path.join(PACKAGE_ROOT, file), 'utf-8'); - - if (!/@flow/.test(source)) { - throw new Error( - file + - ' is untyped. All source files in the react-native package must be written using Flow (// @flow).', - ); - } - - // Require and use adjacent .js.flow file when source file includes an - // unsupported-syntax suppression - if ( - source.includes('// $FlowFixMe[unsupported-syntax]') || - source.includes('// $FlowIssue[unsupported-syntax]') - ) { - const flowDefPath = path.join( - PACKAGE_ROOT, - file.replace('.js', '.js.flow'), - ); - - if (!existsSync(flowDefPath)) { - throw new Error( - 'Found an unsupported-syntax suppression in ' + - file + - ', meaning types cannot be parsed. Add an adjacent .js.flow file to fix this!', - ); - } - - return; - } - - try { - expect(await translateFlowToExportedAPI(source)).toMatchSnapshot(); - } catch (e) { - throw new Error('Unable to parse file: ' + file + '\n\n' + e.message); - } - }); - }); -}); - -async function translateFlowToExportedAPI(source: string): Promise { - // Normalize newlines - source = source.replace(/\r\n?/g, '\n'); - // Convert to Flow typedefs - const typeDefSource = await translate.translateFlowToFlowDef(source); - - // Remove comments and import declarations - const visitors: TransformVisitor = context => { - return { - ...stripPrivateProperties(context), - Program(node) { - // $FlowFixMe[cannot-write] - delete node.docblock; - - for (const comment of node.comments) { - context.removeComments(comment); - } - }, - ImportDeclaration(node) { - context.removeNode(node); - }, - }; - }; - - const result = await transform(typeDefSource, visitors); - - // Remove empty lines (saves space, consistency fix on Windows) - return result.replaceAll('\n\n', '\n'); -} diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts new file mode 100644 index 00000000000000..c02c6ddd74ff3c --- /dev/null +++ b/packages/react-native/ReactNativeApi.d.ts @@ -0,0 +1,6189 @@ +/** + * 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. + * + * @generated SignedSource<> + * + * This file was generated by scripts/build-types/index.js. + */ + +// ---------------------------------------------------------------------------- +// JavaScript API snapshot for react-native. +// +// This snapshot captures the public JavaScript API of React Native, based on +// types exported by packages/react-native/index.js.flow. +// +// Modifications to this file indicate changes to the shape of JavaScript +// values and types that can be imported from the react-native package. +// ---------------------------------------------------------------------------- + +/* eslint-disable redundant-undefined/redundant-undefined */ + +import * as React from "react" +declare const $$AndroidSwitchNativeComponent: NativeType +declare const $$AnimatedFlatList: ( + props: Omit>, "ref"> & { + ref?: React.Ref> + }, +) => React.ReactNode +declare const $$AnimatedImage: AnimatedComponentType< + React.JSX.LibraryManagedAttributes< + typeof Image, + React.ComponentProps + >, + React.ComponentRef +> +declare const $$AnimatedImplementation: { + add: typeof addImpl + attachNativeEvent: typeof attachNativeEventImpl + Color: typeof AnimatedColor_default + createAnimatedComponent: typeof createAnimatedComponent_default + decay: typeof decayImpl + delay: typeof delayImpl + diffClamp: typeof diffClampImpl + divide: typeof divideImpl + event: typeof eventImpl + Event: typeof AnimatedEvent + forkEvent: typeof forkEventImpl + Interpolation: typeof AnimatedInterpolation_default + loop: typeof loopImpl + modulo: typeof moduloImpl + multiply: typeof multiplyImpl + Node: typeof AnimatedNode_default + parallel: typeof parallelImpl + sequence: typeof sequenceImpl + spring: typeof springImpl + stagger: typeof staggerImpl + subtract: typeof subtractImpl + timing: typeof timingImpl + unforkEvent: typeof unforkEventImpl + Value: typeof AnimatedValue_default + ValueXY: typeof AnimatedValueXY_default +} +declare const $$AnimatedScrollView: typeof AnimatedScrollView_default +declare const $$AnimatedSectionList: ( + props: Omit>, "ref"> & { + ref?: React.Ref> + }, +) => React.ReactNode +declare const $$AnimatedText: AnimatedComponentType< + TextProps, + React.ComponentRef +> +declare const $$AnimatedView: AnimatedComponentType< + ViewProps, + React.ComponentRef +> +declare const $$flattenStyle: typeof flattenStyle_default +declare const $$ImageViewNativeComponent: typeof ImageViewNativeComponent_default +declare const $$index: { + keyExtractor: typeof keyExtractor + get FillRateHelper(): FillRateHelperT + get ViewabilityHelper(): ViewabilityHelperT + get VirtualizedList(): VirtualizedListT + get VirtualizedListContextResetter(): VirtualizedListContextResetterT + get VirtualizedSectionList(): AnyVirtualizedSectionList +} +declare const $$NativeDeviceInfo: typeof NativeDeviceInfo_default +declare const $$NativeDialogManagerAndroid: null | Spec | undefined +declare const $$ProgressBarAndroidNativeComponent: HostComponent +declare const $$ScrollViewContext: typeof ScrollViewContext_default +declare const $$ScrollViewNativeComponent: typeof ScrollViewNativeComponent_default +declare const $$SwitchNativeComponent: ComponentType +declare const $$TextInlineImageNativeComponent: typeof TextInlineImage_default +declare const $$ViewNativeComponent: typeof ViewNativeComponent_default +declare const absoluteFill: any +declare const absoluteFillObject: { + readonly bottom: 0 + readonly left: 0 + readonly position: "absolute" + readonly right: 0 + readonly top: 0 +} +declare const AccessibilityInfo: typeof AccessibilityInfo_default +declare const AccessibilityInfo_default: { + addEventListener( + eventName: K, + handler: (...$$REST$$: AccessibilityEventDefinitions[K]) => void, + ): EventSubscription + announceForAccessibility(announcement: string): void + announceForAccessibilityWithOptions( + announcement: string, + options: { + queue?: boolean + }, + ): void + getRecommendedTimeoutMillis(originalTimeout: number): Promise + isAccessibilityServiceEnabled(): Promise + isBoldTextEnabled(): Promise + isDarkerSystemColorsEnabled(): Promise + isGrayscaleEnabled(): Promise + isHighTextContrastEnabled(): Promise + isInvertColorsEnabled(): Promise + isReduceMotionEnabled(): Promise + isReduceTransparencyEnabled(): Promise + isScreenReaderEnabled(): Promise + prefersCrossFadeTransitions(): Promise + sendAccessibilityEvent( + handle: HostInstance, + eventType: AccessibilityEventTypes, + ): void + setAccessibilityFocus(reactTag: number): void +} +declare const ActionSheetIOS: typeof ActionSheetIOS_default +declare const ActionSheetIOS_default: { + dismissActionSheet: () => void + showActionSheetWithOptions( + options: ActionSheetIOSOptions, + callback: (buttonIndex: number) => void, + ): void + showShareActionSheetWithOptions( + options: ShareActionSheetIOSOptions, + failureCallback: ((error: ShareActionSheetError) => void) | Function, + successCallback: + | ((success: boolean, method: null | string | undefined) => void) + | Function, + ): void +} +declare const ActivityIndicator: typeof ActivityIndicator_default +declare const ActivityIndicator_default: ( + props: ActivityIndicatorProps & { + ref?: React.Ref> + }, +) => React.ReactNode +declare const add: typeof $$AnimatedImplementation.add +declare const addImpl: ( + a: AnimatedNode_default | number, + b: AnimatedNode_default | number, +) => AnimatedAddition_default +declare const AnimatedScrollView_default: AnimatedComponentType< + ScrollViewProps, + AnimatedScrollViewInstance +> +declare const AppState: typeof AppState_default +declare const AppState_default: AppStateImpl +declare const attachNativeEvent: typeof $$AnimatedImplementation.attachNativeEvent +declare const BackHandler: typeof BackHandler_default +declare const BackHandler_default: TBackHandler +declare const Button: typeof Button_default +declare const Button_default: ( + props: ButtonProps & { + ref?: React.Ref + }, +) => React.ReactNode +declare const Clipboard: { + getString(): Promise + setString(content: string): void +} +declare const codegenNativeCommands: typeof codegenNativeCommands_default +declare const codegenNativeComponent: typeof codegenNativeComponent_default +declare const compose: typeof composeStyles_default +declare const create: ( + obj: S & ____Styles_Internal, +) => Readonly +declare const createAnimatedComponent: typeof $$AnimatedImplementation.createAnimatedComponent +declare const decay: typeof $$AnimatedImplementation.decay +declare const decayImpl: ( + value: + | AnimatedColor_default + | AnimatedValue_default + | AnimatedValueXY_default, + config: DecayAnimationConfig, +) => CompositeAnimation +declare const delay: typeof $$AnimatedImplementation.delay +declare const delayImpl: (time: number) => CompositeAnimation +declare const DeviceEventEmitter: IEventEmitter +declare const DeviceInfo: typeof $$NativeDeviceInfo +declare const DevMenu: typeof DevMenu_default +declare const DevMenu_default: DevMenuStatic +declare const DevSettings: typeof DevSettings_default +declare let DevSettings_default: { + addMenuItem(title: string, handler: () => unknown): void + onFastRefresh(): void + reload(reason?: string): void +} +declare const diffClamp: typeof $$AnimatedImplementation.diffClamp +declare const diffClampImpl: ( + a: AnimatedNode_default, + min: number, + max: number, +) => AnimatedDiffClamp_default +declare const divide: typeof $$AnimatedImplementation.divide +declare const divideImpl: ( + a: AnimatedNode_default | number, + b: AnimatedNode_default | number, +) => AnimatedDivision_default +declare const DrawerLayoutAndroid: typeof DrawerLayoutAndroid_default +declare const DynamicColorIOS: (tuple: DynamicColorIOSTuple) => ColorValue +declare const Easing: typeof EasingStatic_default +declare const EasingStatic_default: { + back(s?: number): EasingFunction + bezier(x1: number, y1: number, x2: number, y2: number): EasingFunction + bounce(t: number): number + circle(t: number): number + cubic(t: number): number + ease(t: number): number + elastic(bounciness?: number): EasingFunction + exp(t: number): number + in(easing: EasingFunction): EasingFunction + inOut(easing: EasingFunction): EasingFunction + linear(t: number): number + out(easing: EasingFunction): EasingFunction + poly(n: number): EasingFunction + quad(t: number): number + sin(t: number): number + step0(n: number): number + step1(n: number): number +} +declare const event: typeof $$AnimatedImplementation.event +declare const eventImpl: ( + argMapping: ReadonlyArray, + config: EventConfig, +) => any +declare const flatten: typeof $$flattenStyle +declare const forkEvent: typeof $$AnimatedImplementation.forkEvent +declare const hairlineWidth: number +declare const I18nManager: { + doLeftAndRightSwapInRTL: I18nManagerConstants["doLeftAndRightSwapInRTL"] + isRTL: I18nManagerConstants["isRTL"] + allowRTL: (shouldAllow: boolean) => void + forceRTL: (shouldForce: boolean) => void + getConstants: () => I18nManagerConstants + swapLeftAndRightInRTL: (flipStyles: boolean) => void +} +declare const Image: ImageType +declare const ImageViewNativeComponent_default: HostComponent +declare const InputAccessoryView: typeof InputAccessoryView_default +declare const InputAccessoryView_default: React.ComponentType +declare const InteractionManager: typeof InteractionManager_default +declare const InteractionManager_default: typeof InteractionManagerImpl +declare const InteractionManagerImpl: { + Events: { + interactionComplete: "interactionComplete" + interactionStart: "interactionStart" + } + addListener: ( + eventType: string, + listener: (...args: any) => unknown, + context: unknown, + ) => EventSubscription + clearInteractionHandle(handle: Handle): void + createInteractionHandle(): Handle + runAfterInteractions(task: null | Task | undefined): { + cancel: () => void + then: ( + onFulfill?: + | (($$PARAM_0$$: void) => (Promise | U) | undefined) + | undefined, + onReject?: ((error: unknown) => (Promise | U) | undefined) | undefined, + ) => Promise + } + setDeadline(deadline: number): void +} +declare const Keyboard: typeof Keyboard_default +declare const Keyboard_default: KeyboardImpl +declare const LayoutAnimation: typeof LayoutAnimation_default +declare const LayoutAnimation_default: { + configureNext: typeof configureNext + create: typeof createLayoutAnimation + Presets: typeof Presets + Properties: LayoutAnimationProperties + setEnabled: typeof setLayoutAnimationEnabled + Types: LayoutAnimationTypes + easeInEaseOut: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void + linear: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void + spring: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void + checkConfig(...args: Array): void +} +declare const Linking: typeof Linking_default +declare const Linking_default: LinkingImpl +declare const LogBox: ILogBox +declare const loop: typeof $$AnimatedImplementation.loop +declare const loopImpl: ( + animation: CompositeAnimation, + $$PARAM_1$$?: LoopAnimationConfig, +) => CompositeAnimation +declare const Modal: typeof Wrapper_default +declare const modulo: typeof $$AnimatedImplementation.modulo +declare const moduloImpl: ( + a: AnimatedNode_default, + modulus: number, +) => AnimatedModulo_default +declare const multiply: typeof $$AnimatedImplementation.multiply +declare const multiplyImpl: ( + a: AnimatedNode_default | number, + b: AnimatedNode_default | number, +) => AnimatedMultiplication_default +declare const NativeAppEventEmitter: typeof RCTNativeAppEventEmitter_default +declare const NativeDeviceInfo_default: { + getConstants(): DeviceInfoConstants +} +declare const NativeDialogManagerAndroid: typeof $$NativeDialogManagerAndroid +declare const NativeModules: typeof NativeModules_default +declare let NativeModules_default: { + [moduleName: string]: any +} +declare const NativeText: HostComponent +declare const NativeTouchable: + | typeof TouchableNativeFeedback + | typeof TouchableOpacity +declare const NativeVirtualText: HostComponent +declare const Networking: typeof RCTNetworking_default +declare const PanResponder: typeof PanResponder_default +declare const PanResponder_default: { + create(config: PanResponderCallbacks): { + panHandlers: GestureResponderHandlerMethods + getInteractionHandle: () => number | undefined + } +} +declare const parallel: typeof $$AnimatedImplementation.parallel +declare const parallelImpl: ( + animations: Array, + config?: null | ParallelConfig | undefined, +) => CompositeAnimation +declare const PermissionsAndroid: typeof PermissionsAndroidInstance_default +declare const PermissionsAndroidInstance_default: PermissionsAndroidImpl +declare const Platform: PlatformType +declare const Presets: { + easeInEaseOut: LayoutAnimationConfig + linear: LayoutAnimationConfig + spring: LayoutAnimationConfig +} +declare const Pressable: ( + props: PressableProps & { + ref?: React.Ref> + }, +) => React.ReactNode +declare const processColor: typeof processColor_default +declare const ProgressBarAndroid: typeof ProgressBarAndroid_default +declare let ProgressBarAndroid_default: ( + props: Omit_2< + Omit_2, + keyof { + ref?: React.Ref> + } + > & { + ref?: React.Ref> + }, +) => React.ReactNode +declare const RCTNativeAppEventEmitter_default: typeof DeviceEventEmitter +declare const RCTNetworking_default: { + abortRequest(requestId: number): void + addListener( + eventType: K, + listener: (...$$REST$$: RCTNetworkingEventDefinitions[K]) => unknown, + context?: unknown, + ): EventSubscription + clearCookies(callback: (result: boolean) => void): void + sendRequest( + method: string, + trackingName: string | void, + url: string, + headers: {}, + data: RequestBody, + responseType: NativeResponseType, + incrementalUpdates: boolean, + timeout: number, + callback: (requestId: number) => void, + withCredentials: boolean, + ): void +} +declare const registerCallableModule: typeof registerCallableModule_default +declare const registerCallableModule_default: RegisterCallableModule +declare const requireNativeComponent: typeof requireNativeComponent_default +declare const requireNativeComponent_default: ( + uiViewClassName: string, +) => HostComponent +declare const RootTagContext: React.Context +declare const SafeAreaView: typeof SafeAreaView_default +declare const SafeAreaView_default: ( + props: ViewProps & { + ref?: React.Ref> + }, +) => React.ReactNode +declare const ScrollView: typeof ScrollViewWrapper & ScrollViewComponentStatics +declare const ScrollViewContext_default: React.Context +declare const ScrollViewNativeComponent_default: HostComponent +declare const ScrollViewWrapper: ( + props: ScrollViewProps & { + ref?: React.Ref + }, +) => React.ReactNode +declare const sequence: typeof $$AnimatedImplementation.sequence +declare const sequenceImpl: ( + animations: Array, +) => CompositeAnimation +declare const setStyleAttributePreprocessor: ( + property: string, + process: (nextProp: any) => any, +) => void +declare const Settings: typeof Settings_default +declare let Settings_default: { + clearWatch(watchId: number): void + get(key: string): any + set(settings: Object): void + watchKeys(keys: Array | string, callback: () => void): number +} +declare const spring: typeof $$AnimatedImplementation.spring +declare const springImpl: ( + value: + | AnimatedColor_default + | AnimatedValue_default + | AnimatedValueXY_default, + config: SpringAnimationConfig, +) => CompositeAnimation +declare const stagger: typeof $$AnimatedImplementation.stagger +declare const staggerImpl: ( + time: number, + animations: Array, +) => CompositeAnimation +declare const States: { + ERROR: "ERROR" + NOT_RESPONDER: "NOT_RESPONDER" + RESPONDER_ACTIVE_LONG_PRESS_IN: "RESPONDER_ACTIVE_LONG_PRESS_IN" + RESPONDER_ACTIVE_LONG_PRESS_OUT: "RESPONDER_ACTIVE_LONG_PRESS_OUT" + RESPONDER_ACTIVE_PRESS_IN: "RESPONDER_ACTIVE_PRESS_IN" + RESPONDER_ACTIVE_PRESS_OUT: "RESPONDER_ACTIVE_PRESS_OUT" + RESPONDER_INACTIVE_PRESS_IN: "RESPONDER_INACTIVE_PRESS_IN" + RESPONDER_INACTIVE_PRESS_OUT: "RESPONDER_INACTIVE_PRESS_OUT" +} +declare const subtract: typeof $$AnimatedImplementation.subtract +declare const subtractImpl: ( + a: AnimatedNode_default | number, + b: AnimatedNode_default | number, +) => AnimatedSubtraction_default +declare const Switch: typeof Switch_default +declare const Switch_default: ( + props: SwitchProps & { + ref?: React.Ref + }, +) => React.ReactNode +declare const Text: typeof TextImpl_default +declare const TextImpl_default: ( + props: TextProps & { + ref?: React.Ref + }, +) => React.ReactNode +declare const TextInlineImage_default: HostComponent +declare const TextInput: TextInputType +declare const timing: typeof $$AnimatedImplementation.timing +declare const timingImpl: ( + value: + | AnimatedColor_default + | AnimatedValue_default + | AnimatedValueXY_default, + config: TimingAnimationConfig, +) => CompositeAnimation +declare const ToastAndroid: typeof ToastAndroid_default +declare const ToastAndroid_default: { + BOTTOM: number + CENTER: number + LONG: number + SHORT: number + TOP: number + show: (message: string, duration: number) => void + showWithGravity: (message: string, duration: number, gravity: number) => void + showWithGravityAndOffset: ( + message: string, + duration: number, + gravity: number, + xOffset: number, + yOffset: number, + ) => void +} +declare const Touchable: typeof TouchableImpl_default +declare const Touchable_default: ( + props: TouchableOpacityProps & { + ref?: React.Ref> + }, +) => React.ReactNode +declare const TouchableHighlight: typeof TouchableHighlight_default +declare const TouchableHighlight_default: ( + props: Readonly> & { + ref?: React.Ref> + }, +) => React.ReactNode +declare const TouchableImpl_default: { + Mixin: typeof TouchableMixinImpl + renderDebugView: ($$PARAM_0$$: { + color: ColorValue + hitSlop?: EdgeInsetsProp + }) => null | React.ReactNode +} +declare const TouchableMixinImpl: { + withoutDefaultFocusAndBlur: {} + componentDidMount: () => void + componentWillUnmount: () => void + touchableGetInitialState: () => { + touchable: { + responderID: GestureResponderEvent["currentTarget"] | undefined + touchState: TouchableState | undefined + } + } + touchableHandleBlur: (e: BlurEvent) => void + touchableHandleFocus: (e: FocusEvent) => void + touchableHandleResponderGrant: (e: GestureResponderEvent) => void + touchableHandleResponderMove: (e: GestureResponderEvent) => void + touchableHandleResponderRelease: (e: GestureResponderEvent) => void + touchableHandleResponderTerminate: (e: GestureResponderEvent) => void + touchableHandleResponderTerminationRequest: () => any + touchableHandleStartShouldSetResponder: () => any + touchableLongPressCancelsPress: () => boolean +} +declare const TouchableOpacity: typeof Touchable_default +declare const UIManager: typeof UIManager_default +declare const UIManager_default: UIManagerJSInterface +declare const unforkEvent: typeof $$AnimatedImplementation.unforkEvent +declare const UTFSequence: typeof UTFSequence_default +declare const UTFSequence_default: { + BOM: string + BULLET: string + BULLET_SP: string + MDASH: string + MDASH_SP: string + MIDDOT: string + MIDDOT_KATAKANA: string + MIDDOT_SP: string + NBSP: string + NDASH: string + NDASH_SP: string + NEWLINE: string + PIZZA: string + TRIANGLE_LEFT: string + TRIANGLE_RIGHT: string +} +declare const Vibration: typeof Vibration_default +declare const Vibration_default: { + cancel: () => void + vibrate: (pattern?: Array | number, repeat?: boolean) => void +} +declare const ViewNativeComponent_default: HostComponent +declare const VirtualizedList: typeof VirtualizedListComponent_default +declare const VirtualizedListComponent_default: VirtualizedListType +declare const VirtualizedListContext: React.Context +declare const VirtualizedSectionList: typeof VirtualizedSectionList_default +declare const VirtualizedSectionList_default: VirtualizedSectionListType +declare const VirtualizedSectionListComponent_default: < + ItemT, + SectionT extends SectionBase< + ItemT, + DefaultVirtualizedSectionT + > = DefaultVirtualizedSectionT, +>( + props: Omit, "ref"> & { + ref: React.Ref<{ + getListRef(): undefined | VirtualizedList_default + scrollToLocation(params: ScrollToLocationParamsType): void + }> + }, +) => React.ReactNode +declare type ____BlendMode_Internal = + | "color-burn" + | "color-dodge" + | "color" + | "darken" + | "difference" + | "exclusion" + | "hard-light" + | "hue" + | "lighten" + | "luminosity" + | "multiply" + | "normal" + | "overlay" + | "saturation" + | "screen" + | "soft-light" +declare type ____ColorValue_Internal = NativeColorValue | null | number | string +declare type ____DangerouslyImpreciseAnimatedStyleProp_Internal = + WithAnimatedValue>> +declare type ____DangerouslyImpreciseStyle_Internal = Readonly< + ____DangerouslyImpreciseStyle_InternalCore & + ____DangerouslyImpreciseStyle_InternalOverrides +> +declare type ____DangerouslyImpreciseStyle_InternalCore = Readonly< + ____TextStyle_Internal & { + objectFit?: "contain" | "cover" | "fill" | "none" | "scale-down" + overlayColor?: ColorValue + resizeMode?: ImageResizeMode + tintColor?: ____ColorValue_Internal + } +> +declare type ____DangerouslyImpreciseStyle_InternalOverrides = {} +declare type ____FlattenStyleProp_Helper< + TStyleProp extends StyleProp, + Depth extends FlattenDepthLimiter[keyof FlattenDepthLimiter] = 9, +> = Depth extends 0 + ? never + : TStyleProp extends "" | false | null | void + ? never + : TStyleProp extends ReadonlyArray + ? ____FlattenStyleProp_Helper< + V, + Depth extends number ? FlattenDepthLimiter[Depth] : 0 + > + : TStyleProp +declare type ____FlattenStyleProp_Internal< + TStyleProp extends StyleProp, +> = ____FlattenStyleProp_Helper extends never + ? any + : ____FlattenStyleProp_Helper +declare type ____FontVariant_Internal = + | "common-ligatures" + | "contextual" + | "discretionary-ligatures" + | "historical-ligatures" + | "lining-nums" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "oldstyle-nums" + | "proportional-nums" + | "small-caps" + | "stylistic-eight" + | "stylistic-eighteen" + | "stylistic-eleven" + | "stylistic-fifteen" + | "stylistic-five" + | "stylistic-four" + | "stylistic-fourteen" + | "stylistic-nine" + | "stylistic-nineteen" + | "stylistic-one" + | "stylistic-seven" + | "stylistic-seventeen" + | "stylistic-six" + | "stylistic-sixteen" + | "stylistic-ten" + | "stylistic-thirteen" + | "stylistic-three" + | "stylistic-twelve" + | "stylistic-twenty" + | "stylistic-two" + | "tabular-nums" +declare type ____FontVariantArray_Internal = + ReadonlyArray<____FontVariant_Internal> +declare type ____FontWeight_Internal = + | "100" + | "200" + | "300" + | "400" + | "500" + | "600" + | "700" + | "800" + | "900" + | "black" + | "bold" + | "condensed" + | "condensedBold" + | "heavy" + | "light" + | "medium" + | "normal" + | "regular" + | "semibold" + | "thin" + | "ultralight" + | 100 + | 200 + | 300 + | 400 + | 500 + | 600 + | 700 + | 800 + | 900 +declare type ____ImageStyle_Internal = Readonly< + ____ImageStyle_InternalCore & ____ImageStyle_InternalOverrides +> +declare type ____ImageStyle_InternalCore = Readonly< + Omit<____ViewStyle_Internal, "overflow"> & { + objectFit?: "contain" | "cover" | "fill" | "none" | "scale-down" + overflow?: "hidden" | "visible" + overlayColor?: ColorValue + resizeMode?: ImageResizeMode + tintColor?: ____ColorValue_Internal + } +> +declare type ____ImageStyle_InternalOverrides = {} +declare type ____ImageStyleProp_Internal = StyleProp< + Readonly> +> +declare type ____LayoutStyle_Internal = { + readonly alignContent?: + | "center" + | "flex-end" + | "flex-start" + | "space-around" + | "space-between" + | "space-evenly" + | "stretch" + readonly alignItems?: + | "baseline" + | "center" + | "flex-end" + | "flex-start" + | "stretch" + readonly alignSelf?: + | "auto" + | "baseline" + | "center" + | "flex-end" + | "flex-start" + | "stretch" + readonly aspectRatio?: number | string + readonly borderBottomWidth?: number + readonly borderEndWidth?: number + readonly borderLeftWidth?: number + readonly borderRightWidth?: number + readonly borderStartWidth?: number + readonly borderTopWidth?: number + readonly borderWidth?: number + readonly bottom?: DimensionValue + readonly boxSizing?: "border-box" | "content-box" + readonly columnGap?: number | string + readonly direction?: "inherit" | "ltr" | "rtl" + readonly display?: "contents" | "flex" | "none" + readonly end?: DimensionValue + readonly flex?: number + readonly flexBasis?: number | string + readonly flexDirection?: "column-reverse" | "column" | "row-reverse" | "row" + readonly flexGrow?: number + readonly flexShrink?: number + readonly flexWrap?: "nowrap" | "wrap-reverse" | "wrap" + readonly gap?: number | string + readonly height?: DimensionValue + readonly inset?: DimensionValue + readonly insetBlock?: DimensionValue + readonly insetBlockEnd?: DimensionValue + readonly insetBlockStart?: DimensionValue + readonly insetInline?: DimensionValue + readonly insetInlineEnd?: DimensionValue + readonly insetInlineStart?: DimensionValue + readonly justifyContent?: + | "center" + | "flex-end" + | "flex-start" + | "space-around" + | "space-between" + | "space-evenly" + readonly left?: DimensionValue + readonly margin?: DimensionValue + readonly marginBlock?: DimensionValue + readonly marginBlockEnd?: DimensionValue + readonly marginBlockStart?: DimensionValue + readonly marginBottom?: DimensionValue + readonly marginEnd?: DimensionValue + readonly marginHorizontal?: DimensionValue + readonly marginInline?: DimensionValue + readonly marginInlineEnd?: DimensionValue + readonly marginInlineStart?: DimensionValue + readonly marginLeft?: DimensionValue + readonly marginRight?: DimensionValue + readonly marginStart?: DimensionValue + readonly marginTop?: DimensionValue + readonly marginVertical?: DimensionValue + readonly maxHeight?: DimensionValue + readonly maxWidth?: DimensionValue + readonly minHeight?: DimensionValue + readonly minWidth?: DimensionValue + readonly overflow?: "hidden" | "scroll" | "visible" + readonly padding?: DimensionValue + readonly paddingBlock?: DimensionValue + readonly paddingBlockEnd?: DimensionValue + readonly paddingBlockStart?: DimensionValue + readonly paddingBottom?: DimensionValue + readonly paddingEnd?: DimensionValue + readonly paddingHorizontal?: DimensionValue + readonly paddingInline?: DimensionValue + readonly paddingInlineEnd?: DimensionValue + readonly paddingInlineStart?: DimensionValue + readonly paddingLeft?: DimensionValue + readonly paddingRight?: DimensionValue + readonly paddingStart?: DimensionValue + readonly paddingTop?: DimensionValue + readonly paddingVertical?: DimensionValue + readonly position?: "absolute" | "relative" | "static" + readonly right?: DimensionValue + readonly rowGap?: number | string + readonly start?: DimensionValue + readonly top?: DimensionValue + readonly width?: DimensionValue + readonly zIndex?: number +} +declare type ____ShadowStyle_Internal = Readonly< + ____ShadowStyle_InternalCore & ____ShadowStyle_InternalOverrides +> +declare type ____ShadowStyle_InternalCore = { + readonly shadowColor?: ____ColorValue_Internal + readonly shadowOffset?: { + readonly height?: number + readonly width?: number + } + readonly shadowOpacity?: number + readonly shadowRadius?: number +} +declare type ____ShadowStyle_InternalOverrides = {} +declare type ____Styles_Internal = { + readonly [key: string]: Partial<____DangerouslyImpreciseStyle_Internal> +} +declare type ____TextStyle_Internal = Readonly< + ____TextStyle_InternalCore & ____TextStyle_InternalOverrides +> +declare type ____TextStyle_InternalBase = { + readonly color?: ____ColorValue_Internal + readonly fontFamily?: string + readonly fontSize?: number + readonly fontStyle?: "italic" | "normal" + readonly fontVariant?: ____FontVariantArray_Internal | string + readonly fontWeight?: ____FontWeight_Internal + readonly includeFontPadding?: boolean + readonly letterSpacing?: number + readonly lineHeight?: number + readonly textAlign?: "auto" | "center" | "justify" | "left" | "right" + readonly textAlignVertical?: "auto" | "bottom" | "center" | "top" + readonly textDecorationColor?: ____ColorValue_Internal + readonly textDecorationLine?: + | "line-through" + | "none" + | "underline line-through" + | "underline" + readonly textDecorationStyle?: "dashed" | "dotted" | "double" | "solid" + readonly textShadowColor?: ____ColorValue_Internal + readonly textShadowOffset?: { + readonly height: number + readonly width: number + } + readonly textShadowRadius?: number + readonly textTransform?: "capitalize" | "lowercase" | "none" | "uppercase" + readonly userSelect?: "all" | "auto" | "contain" | "none" | "text" + readonly verticalAlign?: "auto" | "bottom" | "middle" | "top" + readonly writingDirection?: "auto" | "ltr" | "rtl" +} +declare type ____TextStyle_InternalCore = Readonly< + ____ViewStyle_Internal & ____TextStyle_InternalBase +> +declare type ____TextStyle_InternalOverrides = {} +declare type ____TextStyleProp_Internal = StyleProp< + Readonly> +> +declare type ____TransformStyle_Internal = { + readonly transform?: + | ReadonlyArray< + Readonly< + MaximumOneOf< + MergeUnion< + | { + readonly matrix: + | AnimatedNode_default + | ReadonlyArray + } + | { + readonly perspective: AnimatedNode_default | number + } + | { + readonly rotate: AnimatedNode_default | string + } + | { + readonly rotateX: AnimatedNode_default | string + } + | { + readonly rotateY: AnimatedNode_default | string + } + | { + readonly rotateZ: AnimatedNode_default | string + } + | { + readonly scale: AnimatedNode_default | number + } + | { + readonly scaleX: AnimatedNode_default | number + } + | { + readonly scaleY: AnimatedNode_default | number + } + | { + readonly skewX: AnimatedNode_default | string + } + | { + readonly skewY: AnimatedNode_default | string + } + | { + readonly translate: + | [ + AnimatedNode_default | number | string, + AnimatedNode_default | number | string, + ] + | AnimatedNode_default + } + | { + readonly translateX: AnimatedNode_default | number | string + } + | { + readonly translateY: AnimatedNode_default | number | string + } + > + > + > + > + | string + readonly transformOrigin?: + | [number | string, number | string, number | string] + | string +} +declare type ____ViewStyle_Internal = Readonly< + ____ViewStyle_InternalCore & ____ViewStyle_InternalOverrides +> +declare type ____ViewStyle_InternalBase = { + readonly backfaceVisibility?: "hidden" | "visible" + readonly backgroundColor?: ____ColorValue_Internal + readonly borderBlockColor?: ____ColorValue_Internal + readonly borderBlockEndColor?: ____ColorValue_Internal + readonly borderBlockStartColor?: ____ColorValue_Internal + readonly borderBottomColor?: ____ColorValue_Internal + readonly borderBottomEndRadius?: number | string + readonly borderBottomLeftRadius?: number | string + readonly borderBottomRightRadius?: number | string + readonly borderBottomStartRadius?: number | string + readonly borderBottomWidth?: number + readonly borderColor?: ____ColorValue_Internal + readonly borderCurve?: "circular" | "continuous" + readonly borderEndColor?: ____ColorValue_Internal + readonly borderEndEndRadius?: number | string + readonly borderEndStartRadius?: number | string + readonly borderEndWidth?: number + readonly borderLeftColor?: ____ColorValue_Internal + readonly borderLeftWidth?: number + readonly borderRadius?: number | string + readonly borderRightColor?: ____ColorValue_Internal + readonly borderRightWidth?: number + readonly borderStartColor?: ____ColorValue_Internal + readonly borderStartEndRadius?: number | string + readonly borderStartStartRadius?: number | string + readonly borderStartWidth?: number + readonly borderStyle?: "dashed" | "dotted" | "solid" + readonly borderTopColor?: ____ColorValue_Internal + readonly borderTopEndRadius?: number | string + readonly borderTopLeftRadius?: number | string + readonly borderTopRightRadius?: number | string + readonly borderTopStartRadius?: number | string + readonly borderTopWidth?: number + readonly borderWidth?: number + readonly boxShadow?: ReadonlyArray | string + readonly cursor?: CursorValue + readonly elevation?: number + readonly filter?: ReadonlyArray | string + readonly isolation?: "auto" | "isolate" + readonly mixBlendMode?: ____BlendMode_Internal + readonly opacity?: number + readonly outlineColor?: ____ColorValue_Internal + readonly outlineOffset?: number + readonly outlineStyle?: "dashed" | "dotted" | "solid" + readonly outlineWidth?: number + readonly pointerEvents?: "auto" | "box-none" | "box-only" | "none" +} +declare type ____ViewStyle_InternalCore = Readonly< + ____LayoutStyle_Internal & + ____ShadowStyle_Internal & + ____TransformStyle_Internal & + ____ViewStyle_InternalBase +> +declare type ____ViewStyle_InternalOverrides = {} +declare type ____ViewStyleProp_Internal = StyleProp< + Readonly> +> +declare type $$AndroidSwitchNativeComponent = + typeof $$AndroidSwitchNativeComponent +declare type $$AnimatedFlatList = typeof $$AnimatedFlatList +declare type $$AnimatedImage = typeof $$AnimatedImage +declare type $$AnimatedImplementation = typeof $$AnimatedImplementation +declare type $$AnimatedScrollView = typeof $$AnimatedScrollView +declare type $$AnimatedSectionList = typeof $$AnimatedSectionList +declare type $$AnimatedText = typeof $$AnimatedText +declare type $$AnimatedView = typeof $$AnimatedView +declare type $$flattenStyle = typeof $$flattenStyle +declare type $$ImageViewNativeComponent = typeof $$ImageViewNativeComponent +declare type $$index = typeof $$index +declare type $$NativeDeviceInfo = typeof $$NativeDeviceInfo +declare type $$NativeDialogManagerAndroid = typeof $$NativeDialogManagerAndroid +declare type $$ProgressBarAndroidNativeComponent = + typeof $$ProgressBarAndroidNativeComponent +declare type $$ScrollViewContext = typeof $$ScrollViewContext +declare type $$ScrollViewNativeComponent = typeof $$ScrollViewNativeComponent +declare type $$SwitchNativeComponent = typeof $$SwitchNativeComponent +declare type $$TextInlineImageNativeComponent = + typeof $$TextInlineImageNativeComponent +declare type $$ViewNativeComponent = typeof $$ViewNativeComponent +declare type absoluteFill = typeof absoluteFill +declare type absoluteFillObject = typeof absoluteFillObject +declare type AbstractImageAndroid = ( + props: ImageProps & { + ref?: React.Ref< + | React.ComponentRef + | React.ComponentRef + > + }, +) => React.ReactNode +declare type AbstractImageIOS = ( + props: ImageProps & { + ref?: React.Ref> + }, +) => React.ReactNode +declare type AccessibilityActionEvent = NativeSyntheticEvent<{ + readonly actionName: string +}> +declare type AccessibilityActionInfo = { + readonly label?: string + readonly name: AccessibilityActionName | string +} +declare type AccessibilityActionName = + | "activate" + | "decrement" + | "escape" + | "increment" + | "longpress" + | "magicTap" +declare type AccessibilityEventDefinitions = + AccessibilityEventDefinitionsAndroid & + AccessibilityEventDefinitionsIOS & { + change: [boolean] + reduceMotionChanged: [boolean] + screenReaderChanged: [boolean] + } +declare type AccessibilityEventDefinitionsAndroid = { + accessibilityServiceChanged: [boolean] + highTextContrastChanged: [boolean] +} +declare type AccessibilityEventDefinitionsIOS = { + announcementFinished: [ + { + announcement: string + success: boolean + }, + ] + boldTextChanged: [boolean] + darkerSystemColorsChanged: [boolean] + grayscaleChanged: [boolean] + invertColorsChanged: [boolean] + reduceTransparencyChanged: [boolean] +} +declare type AccessibilityEventTypes = "click" | "focus" | "viewHoverEnter" +declare type AccessibilityInfo = typeof AccessibilityInfo +declare type AccessibilityProps = Readonly< + AccessibilityPropsAndroid & + AccessibilityPropsIOS & { + accessibilityActions?: ReadonlyArray + accessibilityHint?: string + accessibilityLabel?: string + accessibilityRole?: AccessibilityRole + accessibilityState?: AccessibilityState + accessibilityValue?: AccessibilityValue + accessible?: boolean + "aria-busy"?: boolean + "aria-checked"?: "mixed" | (boolean | undefined) + "aria-disabled"?: boolean + "aria-expanded"?: boolean + "aria-hidden"?: boolean + "aria-label"?: string + "aria-selected"?: boolean + "aria-valuemax"?: AccessibilityValue["max"] + "aria-valuemin"?: AccessibilityValue["min"] + "aria-valuenow"?: AccessibilityValue["now"] + "aria-valuetext"?: AccessibilityValue["text"] + role?: Role + } +> +declare type AccessibilityPropsAndroid = { + readonly accessibilityLabelledBy?: + | (Array | undefined) + | (string | undefined) + readonly accessibilityLiveRegion?: "assertive" | "none" | "polite" + readonly "aria-labelledby"?: string + readonly "aria-live"?: "assertive" | "off" | "polite" + readonly importantForAccessibility?: + | "auto" + | "no-hide-descendants" + | "no" + | "yes" + readonly screenReaderFocusable?: boolean +} +declare type AccessibilityPropsIOS = { + readonly accessibilityElementsHidden?: boolean + readonly accessibilityIgnoresInvertColors?: boolean + readonly accessibilityLanguage?: string + readonly accessibilityLargeContentTitle?: string + readonly accessibilityRespondsToUserInteraction?: boolean + readonly accessibilityShowsLargeContentViewer?: boolean + readonly accessibilityViewIsModal?: boolean + readonly "aria-modal"?: boolean +} +declare type AccessibilityRole = + | "adjustable" + | "alert" + | "button" + | "checkbox" + | "combobox" + | "drawerlayout" + | "dropdownlist" + | "grid" + | "header" + | "horizontalscrollview" + | "iconmenu" + | "image" + | "imagebutton" + | "keyboardkey" + | "link" + | "list" + | "menu" + | "menubar" + | "menuitem" + | "none" + | "pager" + | "progressbar" + | "radio" + | "radiogroup" + | "scrollbar" + | "scrollview" + | "search" + | "slidingdrawer" + | "spinbutton" + | "summary" + | "switch" + | "tab" + | "tabbar" + | "tablist" + | "text" + | "timer" + | "togglebutton" + | "toolbar" + | "viewgroup" + | "webview" + | string +declare type AccessibilityState = { + busy?: boolean + checked?: "mixed" | (boolean | undefined) + disabled?: boolean + expanded?: boolean + selected?: boolean +} +declare type AccessibilityValue = { + readonly max?: number + readonly min?: number + readonly now?: number + readonly text?: string +} +declare type ActionSheetIOS = typeof ActionSheetIOS +declare type ActionSheetIOSOptions = { + readonly anchor?: number + readonly cancelButtonIndex?: number + readonly cancelButtonTintColor?: ColorValue | ProcessedColorValue + readonly destructiveButtonIndex?: + | (Array | undefined) + | (number | undefined) + readonly disabledButtonIndices?: Array + readonly disabledButtonTintColor?: ColorValue | ProcessedColorValue + readonly message?: string + readonly options: Array + readonly tintColor?: ColorValue | ProcessedColorValue + readonly title?: string + readonly userInterfaceStyle?: string +} +declare type ActiveCallback = ( + event: GestureResponderEvent, + gestureState: PanResponderGestureState, +) => boolean +declare type ActivityIndicator = typeof ActivityIndicator +declare type ActivityIndicatorIOSProps = { + readonly hidesWhenStopped?: boolean +} +declare type ActivityIndicatorProps = Readonly< + ViewProps & + ActivityIndicatorIOSProps & { + animating?: boolean + color?: ColorValue + size?: IndicatorSize + } +> +declare type add = typeof add +declare function addChangeListener( + listener: ($$PARAM_0$$: { colorScheme: ColorSchemeName | undefined }) => void, +): EventSubscription +declare class Alert { + static alert( + title: null | string | undefined, + message?: null | string | undefined, + buttons?: AlertButtons, + options?: AlertOptions, + ): void + static prompt( + title: null | string | undefined, + message?: null | string | undefined, + callbackOrButtons?: + | (((text: string) => void) | AlertButtons) + | null + | undefined, + type?: AlertType | null | undefined, + defaultValue?: string, + keyboardType?: string, + options?: AlertOptions, + ): void +} +declare type AlertButton = { + isPreferred?: boolean + onPress?: (((value?: string) => any) | undefined) | (Function | undefined) + style?: AlertButtonStyle + text?: string +} +declare type AlertButtons = Array +declare type AlertButtonStyle = "cancel" | "default" | "destructive" +declare type AlertOptions = { + cancelable?: boolean + onDismiss?: () => void + userInterfaceStyle?: "dark" | "light" | "unspecified" +} +declare type AlertType = + | "default" + | "login-password" + | "plain-text" + | "secure-text" +declare type AndroidDrawable = AndroidDrawableRipple | AndroidDrawableThemeAttr +declare type AndroidDrawableRipple = { + readonly borderless?: boolean + readonly color?: number + readonly rippleRadius?: number + readonly type: "RippleAndroid" +} +declare type AndroidDrawableThemeAttr = { + readonly attribute: string + readonly type: "ThemeAttrAndroid" +} +declare type AndroidKeyboardEvent = Readonly< + Omit & { + duration: 0 + easing: "keyboard" + } +> +declare type AndroidPlatform = { + OS: "android" + select: (spec: PlatformSelectSpec) => T + get constants(): { + Brand: string + Fingerprint: string + isDisableAnimations?: boolean + isTesting: boolean + Manufacturer: string + Model: string + reactNativeVersion: { + major: number + minor: number + patch: number + prerelease: string | undefined + } + Release: string + Serial: string + ServerHost?: string + uiMode: string + Version: number + } + get isDisableAnimations(): boolean + get isTesting(): boolean + get isTV(): boolean + get isVision(): boolean + get Version(): number +} +declare type AndroidProgressBarNativeProps = Readonly< + Omit & { + animating?: WithDefault + color?: ColorValue + indeterminate: boolean + progress?: WithDefault + styleAttr?: string + testID?: WithDefault + typeAttr?: string + } +> +declare type AndroidProps = { + readonly nextFocusDown?: number + readonly nextFocusForward?: number + readonly nextFocusLeft?: number + readonly nextFocusRight?: number + readonly nextFocusUp?: number +} +declare type AndroidSwitchChangeEvent = { + readonly target: Int32 + readonly value: boolean +} +declare type AndroidSwitchNativeProps = Readonly< + ViewProps & { + disabled?: WithDefault + enabled?: WithDefault + on?: WithDefault + onChange?: BubblingEventHandler + thumbColor?: ColorValue + thumbTintColor?: ColorValue + trackColorForFalse?: ColorValue + trackColorForTrue?: ColorValue + trackTintColor?: ColorValue + value?: WithDefault + } +> +declare namespace Animated { + export { + DecayAnimationConfig, + SpringAnimationConfig, + TimingAnimationConfig, + $$AnimatedFlatList as FlatList, + $$AnimatedImage as Image, + $$AnimatedScrollView as ScrollView, + $$AnimatedSectionList as SectionList, + $$AnimatedText as Text, + $$AnimatedView as View, + AnimatedColor_default as Color, + AnimatedEvent as Event, + AnimatedInterpolation_default as Interpolation, + AnimatedNode_default as Node, + AnimatedValue_default as Value, + AnimatedValueXY_default as ValueXY, + AnimatedInterpolation_default as AnimatedInterpolation, + AnimatedColor_default as AnimatedColor, + AnimatedValueConfig as AnimatedConfig, + AnimatedNode_default as AnimatedNode, + AnimatedAddition_default as AnimatedAddition, + AnimatedDiffClamp_default as AnimatedDiffClamp, + AnimatedDivision_default as AnimatedDivision, + InterpolationConfigType as InterpolationConfig, + AnimatedModulo_default as AnimatedModulo, + AnimatedMultiplication_default as AnimatedMultiplication, + AnimatedSubtraction_default as AnimatedSubtraction, + WithAnimatedValue, + AnimatedProps, + AnimatedComponentType as AnimatedComponent, + add, + attachNativeEvent, + createAnimatedComponent, + decay, + delay, + diffClamp, + divide, + event, + forkEvent, + loop, + modulo, + multiply, + parallel, + sequence, + spring, + stagger, + subtract, + timing, + unforkEvent, + } +} +declare class AnimatedAddition_default extends AnimatedWithChildren_default { + constructor( + a: AnimatedNode_default | number, + b: AnimatedNode_default | number, + config?: AnimatedNodeConfig | null | undefined, + ) + interpolate( + config: InterpolationConfigType, + ): AnimatedInterpolation_default +} +declare class AnimatedColor_default extends AnimatedWithChildren_default { + a: AnimatedValue_default + b: AnimatedValue_default + g: AnimatedValue_default + nativeColor: NativeColorValue | null | undefined + r: AnimatedValue_default + constructor( + valueIn?: InputValue, + config?: AnimatedColorConfig | null | undefined, + ) + extractOffset(): void + flattenOffset(): void + resetAnimation(callback?: ColorListenerCallback): void + setOffset(offset: RgbaValue): void + setValue(value: ColorValue | RgbaValue): void + stopAnimation(callback?: ColorListenerCallback): void +} +declare type AnimatedColorConfig = Readonly< + AnimatedNodeConfig & { + useNativeDriver: boolean + } +> +declare type AnimatedComponentType = ( + props: Omit, "ref"> & { + ref?: React.Ref + }, +) => React.ReactNode +declare class AnimatedDiffClamp_default extends AnimatedWithChildren_default { + constructor( + a: AnimatedNode_default, + min: number, + max: number, + config?: AnimatedNodeConfig | null | undefined, + ) + interpolate( + config: InterpolationConfigType, + ): AnimatedInterpolation_default +} +declare class AnimatedDivision_default extends AnimatedWithChildren_default { + constructor( + a: AnimatedNode_default | number, + b: AnimatedNode_default | number, + config?: AnimatedNodeConfig | null | undefined, + ) + interpolate( + config: InterpolationConfigType, + ): AnimatedInterpolation_default +} +declare class AnimatedEvent { + constructor( + argMapping: ReadonlyArray, + config: EventConfig, + ) +} +declare class AnimatedInterpolation_default< + OutputT extends number | string, +> extends AnimatedWithChildren_default { + constructor( + parent: AnimatedNode_default, + config: InterpolationConfigType, + ) + interpolate( + config: InterpolationConfigType, + ): AnimatedInterpolation_default +} +declare class AnimatedModulo_default extends AnimatedWithChildren_default { + constructor( + a: AnimatedNode_default, + modulus: number, + config?: AnimatedNodeConfig | null | undefined, + ) + interpolate( + config: InterpolationConfigType, + ): AnimatedInterpolation_default +} +declare class AnimatedMultiplication_default extends AnimatedWithChildren_default { + constructor( + a: AnimatedNode_default | number, + b: AnimatedNode_default | number, + config?: AnimatedNodeConfig | null | undefined, + ) + interpolate( + config: InterpolationConfigType, + ): AnimatedInterpolation_default +} +declare class AnimatedNode_default { + addListener(callback: (value: any) => unknown): string + constructor(config?: null | Readonly | undefined) + hasListeners(): boolean + removeAllListeners(): void + removeListener(id: string): void + toJSON(): unknown +} +declare type AnimatedNodeConfig = { + readonly debugID?: string +} +declare type AnimatedProps = { + [K in keyof Props]: K extends NonAnimatedProps + ? Props[K] + : WithAnimatedValue +} & PassThroughProps +declare type AnimatedScrollViewInstance = React.ComponentRef +declare class AnimatedSubtraction_default extends AnimatedWithChildren_default { + constructor( + a: AnimatedNode_default | number, + b: AnimatedNode_default | number, + config?: AnimatedNodeConfig | null | undefined, + ) + interpolate( + config: InterpolationConfigType, + ): AnimatedInterpolation_default +} +declare class AnimatedTracking_default extends AnimatedNode_default { + constructor( + value: AnimatedValue_default, + parent: AnimatedNode_default, + animationClass: any, + animationConfig: Object, + callback?: EndCallback | null | undefined, + config?: AnimatedNodeConfig | null | undefined, + ) + update(): void +} +declare class AnimatedValue_default extends AnimatedWithChildren_default { + addListener(callback: (value: any) => unknown): string + animate( + animation: Animation_default, + callback: EndCallback | null | undefined, + ): void + constructor(value: number, config?: AnimatedValueConfig | null | undefined) + extractOffset(): void + flattenOffset(): void + interpolate( + config: InterpolationConfigType, + ): AnimatedInterpolation_default + removeAllListeners(): void + removeListener(id: string): void + resetAnimation(callback?: ((value: number) => void) | null | undefined): void + setOffset(offset: number): void + setValue(value: number): void + stopAnimation(callback?: ((value: number) => void) | null | undefined): void + stopTracking(): void + track(tracking: AnimatedTracking_default): void +} +declare type AnimatedValueConfig = Readonly< + AnimatedNodeConfig & { + useNativeDriver: boolean + } +> +declare class AnimatedValueXY_default extends AnimatedWithChildren_default { + x: AnimatedValue_default + y: AnimatedValue_default + addListener(callback: ValueXYListenerCallback): string + constructor( + valueIn?: + | null + | undefined + | { + readonly x: AnimatedValue_default | number + readonly y: AnimatedValue_default | number + }, + config?: AnimatedValueXYConfig | null | undefined, + ) + extractOffset(): void + flattenOffset(): void + getLayout(): { + [key: string]: AnimatedValue_default + } + getTranslateTransform(): Array< + | { + translateX: AnimatedValue_default + } + | { + translateY: AnimatedValue_default + } + > + removeAllListeners(): void + removeListener(id: string): void + resetAnimation(callback?: (value: { x: number; y: number }) => void): void + setOffset(offset: { x: number; y: number }): void + setValue(value: { x: number; y: number }): void + stopAnimation(callback?: (value: { x: number; y: number }) => void): void +} +declare type AnimatedValueXYConfig = Readonly< + AnimatedNodeConfig & { + useNativeDriver: boolean + } +> +declare class AnimatedWithChildren_default extends AnimatedNode_default {} +declare class Animation_default { + constructor(config: AnimationConfig) + start( + fromValue: number, + onUpdate: (value: number) => void, + onEnd: EndCallback | null | undefined, + previousAnimation: Animation_default | null | undefined, + animatedValue: AnimatedValue_default, + ): void + stop(): void +} +declare type AnimationConfig = { + readonly debugID?: string + readonly isInteraction?: boolean + readonly isLooping?: boolean + readonly iterations?: number + readonly onComplete?: EndCallback + readonly platformConfig?: PlatformConfig + readonly useNativeDriver: boolean +} +declare type AnyAttributeType = AttributeType +declare type AnyVirtualizedSectionList = + typeof VirtualizedSectionListComponent_default +declare type AppConfig = { + appKey: string + component?: ComponentProvider + run?: Runnable + section?: boolean +} +declare namespace Appearance { + export { + getColorScheme, + setColorScheme, + addChangeListener, + AppearancePreferences, + } +} +declare type AppearancePreferences = { + colorScheme?: ColorSchemeName +} +declare type AppParameters = { + fabric?: boolean + initialProps: { + readonly [$$Key$$: string]: unknown + } + rootTag: RootTag +} +declare namespace AppRegistry { + export { + setWrapperComponentProvider, + setRootViewStyleProvider, + registerConfig, + registerComponent, + registerRunnable, + registerSection, + getAppKeys, + getSectionKeys, + getSections, + getRunnable, + getRegistry, + setComponentProviderInstrumentationHook, + runApplication, + setSurfaceProps, + unmountApplicationComponentAtRootTag, + registerHeadlessTask, + registerCancellableHeadlessTask, + startHeadlessTask, + cancelHeadlessTask, + TaskCanceller, + TaskCancelProvider, + } +} +declare type AppState = typeof AppState +declare type AppStateEvent = keyof AppStateEventDefinitions +declare type AppStateEventDefinitions = { + blur: [] + change: [AppStateStatus] + focus: [] + memoryWarning: [] +} +declare class AppStateImpl { + currentState: null | string | undefined + isAvailable: boolean + addEventListener( + type: K, + handler: (...$$REST$$: AppStateEventDefinitions[K]) => void, + ): EventSubscription + constructor() +} +declare type AppStateStatus = + | "active" + | "background" + | "extension" + | "inactive" + | "unknown" +declare interface ArrayLike_2 extends Iterable { + [indexer: number]: T + readonly length: number +} +declare type attachNativeEvent = typeof attachNativeEvent +declare function attachNativeEventImpl( + viewRef: any, + eventName: string, + argMapping: ReadonlyArray, + platformConfig: null | PlatformConfig | undefined, +): { + detach: () => void +} +declare type AttributeConfiguration = { + readonly [propName: string]: AnyAttributeType | void + readonly style?: { + readonly [propName: string]: AnyAttributeType + } +} +declare type AttributeType = + | true + | { + readonly diff?: (arg1: T, arg2: T) => boolean + readonly process?: (arg1: V) => T + } +declare type AutoCapitalize = "characters" | "none" | "sentences" | "words" +declare type BackHandler = typeof BackHandler +declare type BackPressEventName = "backPress" | "hardwareBackPress" +declare type BaseKeyboardEvent = { + duration: number + easing: KeyboardEventEasing + endCoordinates: KeyboardMetrics +} +declare function beginAsyncEvent(eventName: EventName, args?: EventArgs): number +declare function beginEvent(eventName: EventName, args?: EventArgs): void +declare class Blob_default { + close(): void + constructor(parts?: Array, options?: BlobOptions) + set data(data: BlobData | null | undefined) + get data(): BlobData + get size(): number + slice(start?: number, end?: number, contentType?: string): Blob_default + get type(): string +} +declare type BlobData = { + blobId: string + lastModified?: number + name?: string + offset: number + size: number + type?: string +} +declare type BlobOptions = { + lastModified: number + type: string +} +declare type BlurEvent = NativeSyntheticEvent +declare type BoxShadowValue = { + blurRadius?: number | string + color?: ____ColorValue_Internal + inset?: boolean + offsetX: number | string + offsetY: number | string + spreadDistance?: number | string +} +declare type BubblingEventHandler< + T, + PaperName extends never | string = never, +> = (event: NativeSyntheticEvent) => Promise | void +declare type Builtin = ( + ...$$REST$$: ReadonlyArray +) => Date | Error | RegExp | unknown +declare type Button = typeof Button +declare type ButtonProps = { + readonly accessibilityActions?: ReadonlyArray + readonly accessibilityHint?: string + readonly accessibilityLabel?: string + readonly accessibilityLanguage?: string + readonly accessibilityState?: AccessibilityState + readonly accessible?: boolean + readonly "aria-busy"?: boolean + readonly "aria-checked"?: "mixed" | (boolean | undefined) + readonly "aria-disabled"?: boolean + readonly "aria-expanded"?: boolean + readonly "aria-label"?: string + readonly "aria-selected"?: boolean + readonly color?: ColorValue + readonly disabled?: boolean + readonly hasTVPreferredFocus?: boolean + readonly importantForAccessibility?: + | "auto" + | "no-hide-descendants" + | "no" + | "yes" + readonly nextFocusDown?: number + readonly nextFocusForward?: number + readonly nextFocusLeft?: number + readonly nextFocusRight?: number + readonly nextFocusUp?: number + readonly onAccessibilityAction?: (event: AccessibilityActionEvent) => unknown + readonly testID?: string + readonly title: string + readonly touchSoundDisabled?: boolean + readonly onPress?: (event?: GestureResponderEvent) => unknown +} +declare type ButtonRef = React.ComponentRef +declare function cancelHeadlessTask(taskId: number, taskKey: string): void +declare type Category = string +declare type CellMetricProps = { + data: VirtualizedListProps["data"] + getItem: VirtualizedListProps["getItem"] + getItemCount: VirtualizedListProps["getItemCount"] + getItemLayout?: VirtualizedListProps["getItemLayout"] + keyExtractor?: VirtualizedListProps["keyExtractor"] +} +declare type CellMetrics = { + index: number + isMounted: boolean + length: number + offset: number +} +declare type CellRegion = { + first: number + isSpacer: boolean + last: number +} +declare type CellRendererProps = { + readonly cellKey: string + readonly children: React.ReactNode + readonly index: number + readonly item: ItemT + readonly style: StyleProp + readonly onFocusCapture?: (event: FocusEvent) => void + readonly onLayout?: (event: LayoutChangeEvent) => void +} +declare class CellRenderMask { + addCells(cells: { first: number; last: number }): void + constructor(numCells: number) + enumerateRegions(): ReadonlyArray + equals(other: CellRenderMask): boolean + numCells(): number +} +declare type Clipboard = typeof Clipboard +declare type CodeFrame = { + readonly collapse?: boolean + readonly content: string + readonly fileName: string + readonly location: + | undefined + | { + column: number + row: number + } +} +declare type codegenNativeCommands = typeof codegenNativeCommands +declare function codegenNativeCommands_default( + options: NativeCommandsOptions, +): T +declare type codegenNativeComponent = typeof codegenNativeComponent +declare function codegenNativeComponent_default( + componentName: string, + options?: NativeComponentOptions, +): NativeComponentType +declare namespace CodegenTypes { + export { + BubblingEventHandler, + DirectEventHandler, + Double, + Float, + Int32, + UnsafeObject, + UnsafeMixed, + DefaultTypes, + WithDefault, + EventEmitter, + } +} +declare type ColorListenerCallback = (value: ColorValue) => unknown +declare type ColorSchemeName = "dark" | "light" | "unspecified" +declare type ColorValue = ____ColorValue_Internal +declare type ComponentProvider = () => React.ComponentType +declare type ComponentProviderInstrumentationHook = ( + component_: ComponentProvider, + scopedPerformanceLogger: IPerformanceLogger, +) => React.ComponentType +declare type ComponentStack = ReadonlyArray +declare type ComponentStackType = "legacy" | "stack" +declare type ComponentType = HostComponent +declare type compose = typeof compose +declare function composeStyles_default( + style1: null | U | undefined, + style2: null | undefined | V, +): (ReadonlyArray | T) | null | undefined +declare type CompositeAnimation = { + reset: () => void + start: (callback?: EndCallback | undefined, isLooping?: boolean) => void + stop: () => void +} +declare function configureNext( + config: LayoutAnimationConfig, + onAnimationDidEnd?: OnAnimationDidEndCallback, + onAnimationDidFail?: OnAnimationDidFailCallback, +): void +declare type ContentAvailable = 1 | null | void +declare type Context = { + readonly cellKey: string | undefined + readonly horizontal: boolean | undefined + readonly getOutermostParentListRef: () => React.ComponentRef + readonly getScrollMetrics: () => { + contentLength: number + dOffset: number + dt: number + offset: number + timestamp: number + velocity: number + visibleLength: number + zoomScale: number + } + readonly registerAsNestedChild: ($$PARAM_0$$: { + cellKey: string + ref: React.ComponentRef + }) => void + readonly unregisterAsNestedChild: ($$PARAM_0$$: { + ref: React.ComponentRef + }) => void +} +declare function counterEvent(eventName: EventName, value: number): void +declare type create = typeof create +declare type createAnimatedComponent = typeof createAnimatedComponent +declare function createAnimatedComponent_default< + TInstance extends React.ComponentType, +>( + Component: TInstance, +): AnimatedComponentType< + Readonly>, + React.ComponentRef +> +declare function createLayoutAnimation( + duration: number, + type?: LayoutAnimationType, + property?: LayoutAnimationProperty, +): LayoutAnimationConfig +declare function createPublicTextInstance( + internalInstanceHandle: InternalInstanceHandle, + ownerDocument: ReactNativeDocument_default, +): ReadOnlyText_default +declare type createPublicTextInstanceT = typeof createPublicTextInstance +declare type CursorValue = "auto" | "pointer" +declare type DangerouslyImpreciseStyle = ____DangerouslyImpreciseStyle_Internal +declare type DataDetectorTypesType = + | "address" + | "all" + | "calendarEvent" + | "flightNumber" + | "link" + | "lookupSuggestion" + | "none" + | "phoneNumber" + | "trackingNumber" +declare type decay = typeof decay +declare type DecayAnimationConfig = Readonly< + AnimationConfig & { + deceleration?: number + velocity: + | number + | { + readonly x: number + readonly y: number + } + } +> +declare type DecelerationRateType = "fast" | "normal" | number +declare type DefaultSectionT = { + [key: string]: any +} +declare type DefaultTypes = boolean | number | ReadonlyArray | string +declare type DefaultVirtualizedSectionT = { + [key: string]: any + data: any +} +declare type delay = typeof delay +declare interface DEPRECATED_RCTExport { + readonly getConstants?: () => {} +} +declare type DeterminateProgressBarAndroidStyleAttrProp = { + indeterminate: false + progress: number + styleAttr: "Horizontal" +} +declare type DeviceEventEmitter = typeof DeviceEventEmitter +declare type DeviceInfo = typeof DeviceInfo +declare type DeviceInfoConstants = { + readonly Dimensions: DimensionsPayload + readonly isEdgeToEdge?: boolean + readonly isIPhoneX_deprecated?: boolean +} +declare type DevMenu = typeof DevMenu +declare type DevMenuStatic = { + show(): void +} +declare type DevSettings = typeof DevSettings +declare type DialogAction = string +declare type DialogButtonKey = number +declare type DialogOptions = { + buttonNegative?: string + buttonNeutral?: string + buttonPositive?: string + cancelable?: boolean + items?: Array + message?: string + title?: string +} +declare type diffClamp = typeof diffClamp +declare class Dimensions { + static addEventListener(type: "change", handler: Function): EventSubscription + static get(dim: string): DisplayMetrics | DisplayMetricsAndroid + static set(dims: Readonly): void +} +declare type DimensionsPayload = { + screen?: DisplayMetrics + screenPhysicalPixels?: DisplayMetricsAndroid + window?: DisplayMetrics + windowPhysicalPixels?: DisplayMetricsAndroid +} +declare type DimensionValue = "auto" | null | number | string +declare type DirectEventHandler = ( + event: NativeSyntheticEvent, +) => Promise | void +declare type DirectEventProps = { + readonly onAccessibilityAction?: (event: AccessibilityActionEvent) => unknown + readonly onAccessibilityEscape?: () => unknown + readonly onAccessibilityTap?: () => unknown + readonly onLayout?: (event: LayoutChangeEvent) => unknown + readonly onMagicTap?: () => unknown +} +declare type DisplayMetrics = { + fontScale: number + height: number + scale: number + width: number +} +declare type DisplayMetricsAndroid = { + densityDpi: number + fontScale: number + height: number + scale: number + width: number +} +declare type DisplayModeType = symbol & { + __DisplayModeType__: string +} +declare type divide = typeof divide +declare class DOMRect_default extends DOMRectReadOnly_default { + static fromRect(rect?: DOMRectInit | null | undefined): DOMRect_default + get height(): number + set height(height: null | number | undefined) + get width(): number + set width(width: null | number | undefined) + get x(): number + set x(x: null | number | undefined) + get y(): number + set y(y: null | number | undefined) +} +declare interface DOMRectInit { + height?: number + width?: number + x?: number + y?: number +} +declare class DOMRectReadOnly_default { + get bottom(): number + constructor( + x: null | number | undefined, + y: null | number | undefined, + width: null | number | undefined, + height: null | number | undefined, + ) + static fromRect( + rect?: DOMRectInit | null | undefined, + ): DOMRectReadOnly_default + get height(): number + get left(): number + get right(): number + toJSON(): { + bottom: number + height: number + left: number + right: number + top: number + width: number + x: number + y: number + } + get top(): number + get width(): number + get x(): number + get y(): number +} +declare type Double = number +declare type DrawerLayoutAndroid = typeof DrawerLayoutAndroid +declare class DrawerLayoutAndroid_default + extends React.Component + implements DrawerLayoutAndroidMethods +{ + blur(): void + closeDrawer(): void + focus(): void + measure(callback: MeasureOnSuccessCallback): void + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail?: () => void, + ): void + openDrawer(): void + render(): React.ReactNode + setNativeProps(nativeProps: Object): void +} +declare interface DrawerLayoutAndroidMethods { + blur(): void + closeDrawer(): void + focus(): void + measure(callback: MeasureOnSuccessCallback): void + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void + measureLayout( + relativeToNativeNode: number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail?: () => void, + ): void + openDrawer(): void + setNativeProps(nativeProps: Object): void +} +declare type DrawerLayoutAndroidProps = Readonly< + ViewProps & { + drawerBackgroundColor?: ColorValue + drawerLockMode?: "locked-closed" | "locked-open" | "unlocked" + drawerPosition: ("left" | "right") | undefined + drawerWidth?: number + keyboardDismissMode?: "none" | "on-drag" + onDrawerClose?: () => unknown + onDrawerOpen?: () => unknown + onDrawerSlide?: (event: DrawerSlideEvent) => unknown + onDrawerStateChanged?: (state: DrawerStates) => unknown + statusBarBackgroundColor?: ColorValue + renderNavigationView: () => React.JSX.Element + } +> +declare type DrawerLayoutAndroidState = { + drawerOpened: boolean +} +declare type DrawerSlideEvent = NativeSyntheticEvent<{ + readonly offset: number +}> +declare type DrawerStates = "Dragging" | "Idle" | "Settling" +declare type DropShadowValue = { + color?: ____ColorValue_Internal + offsetX: number | string + offsetY: number | string + standardDeviation?: number | string +} +declare type DynamicColorIOS = typeof DynamicColorIOS +declare type DynamicColorIOSTuple = { + dark: ColorValue + highContrastDark?: ColorValue + highContrastLight?: ColorValue + light: ColorValue +} +declare type Easing = typeof Easing +declare type EasingFunction = (t: number) => number +declare type EdgeInsetsOrSizeProp = RectOrSize +declare type EdgeInsetsProp = Rect +declare type EdgeInsetsValue = { + bottom: number + left: number + right: number + top: number +} +declare type EmitterSubscription = EventSubscription +declare function endAsyncEvent( + eventName: EventName, + cookie: number, + args?: EventArgs, +): void +declare type EndCallback = (result: EndResult) => void +declare function endEvent(args?: EventArgs): void +declare type EndResult = { + finished: boolean + offset?: number + value?: number +} +declare type EnterKeyHintType = "done" | "go" | "next" | "search" | "send" +declare type EnterKeyHintTypeAndroid = "previous" +declare type EnterKeyHintTypeIOS = "enter" +declare type EnterKeyHintTypeOptions = + | EnterKeyHintType + | EnterKeyHintTypeAndroid + | EnterKeyHintTypeIOS +declare type ErrorHandler = (error: unknown, isFatal: boolean) => void +declare type ErrorUtils = { + applyWithGuard, TOut>( + fun: Fn, + context?: unknown, + args?: TArgs | undefined, + unused_onError?: null, + unused_name?: string | undefined, + ): TOut | undefined + applyWithGuardIfNeeded, TOut>( + fun: Fn, + context?: unknown, + args?: TArgs | undefined, + ): TOut | undefined + getGlobalHandler(): ErrorHandler + guard, TOut>( + fun: Fn, + name?: string | undefined, + context?: unknown, + ): ((...$$REST$$: TArgs) => TOut | undefined) | undefined + inGuard(): boolean + reportError(error: unknown): void + reportFatalError(error: unknown): void + setGlobalHandler(fun: ErrorHandler): void +} +declare type event = typeof event +declare type EventArgs = + | null + | undefined + | { + [$$Key$$: string]: string + } +declare type EventConfig = { + listener?: ($$PARAM_0$$: NativeSyntheticEvent) => unknown + platformConfig?: PlatformConfig + useNativeDriver: boolean +} +declare type EventEmitter = ( + handler: ($$PARAM_0$$: T) => Promise | void, +) => EventSubscription +declare type EventHandlers = { + readonly onBlur: (event: BlurEvent) => void + readonly onClick: (event: GestureResponderEvent) => void + readonly onFocus: (event: FocusEvent) => void + readonly onMouseEnter?: (event: MouseEvent) => void + readonly onMouseLeave?: (event: MouseEvent) => void + readonly onPointerEnter?: (event: PointerEvent) => void + readonly onPointerLeave?: (event: PointerEvent) => void + readonly onResponderGrant: (event: GestureResponderEvent) => boolean | void + readonly onResponderMove: (event: GestureResponderEvent) => void + readonly onResponderRelease: (event: GestureResponderEvent) => void + readonly onResponderTerminate: (event: GestureResponderEvent) => void + readonly onResponderTerminationRequest: () => boolean + readonly onStartShouldSetResponder: () => boolean +} +declare type EventName = (() => string) | string +declare interface EventSubscription { + remove(): void +} +declare type ExceptionData = { + componentStack: string | undefined + extraData?: Object + id: number + isFatal: boolean + message: string + name: string | undefined + originalMessage: string | undefined + stack: Array +} +declare type ExtendedExceptionData = ExceptionData & { + isComponentError: boolean +} +declare type ExtrapolateType = "clamp" | "extend" | "identity" +declare type Extras = { + [key: string]: ExtraValue +} +declare type ExtraValue = boolean | number | string +declare type FetchResult = { + NewData: "UIBackgroundFetchResultNewData" + NoData: "UIBackgroundFetchResultNoData" + ResultFailed: "UIBackgroundFetchResultFailed" +} +declare class FillRateHelper_default { + activate(): void + static addListener(callback: ($$PARAM_0$$: FillRateInfo) => void): { + remove: () => void + } + computeBlankness( + props: CellMetricProps & { + initialNumToRender?: number + }, + cellsAroundViewport: { + first: number + last: number + }, + scrollMetrics: { + dOffset: number + offset: number + velocity: number + visibleLength: number + }, + ): number + constructor(listMetrics: ListMetricsAggregator_default) + deactivateAndFlush(): void + enabled(): boolean + static setMinSampleCount(minSampleCount: number): void + static setSampleRate(sampleRate: number): void +} +declare type FillRateHelperT = typeof FillRateHelper_default +declare type FillRateInfo = Info +declare type FilterFunction = + | { + blur: number | string + } + | { + brightness: number | string + } + | { + contrast: number | string + } + | { + dropShadow: DropShadowValue | string + } + | { + grayscale: number | string + } + | { + hueRotate: number | string + } + | { + invert: number | string + } + | { + opacity: number | string + } + | { + saturate: number | string + } + | { + sepia: number | string + } +declare function findNodeHandle( + componentOrHandle: + | (number | React.ComponentRef) + | null + | undefined, +): null | number | undefined +declare class FlatList extends React.PureComponent< + FlatListProps +> { + componentDidUpdate(prevProps: FlatListProps): void + constructor(props: FlatListProps) + flashScrollIndicators(): void + getNativeScrollRef(): + | (null | React.ComponentRef | undefined) + | (null | React.ComponentRef | undefined) + getScrollableNode(): any + getScrollResponder(): null | ScrollResponderType | undefined + recordInteraction(): void + render(): React.ReactNode + scrollToEnd( + params?: + | null + | undefined + | { + animated?: boolean + }, + ): void + scrollToIndex(params: { + animated?: boolean + index: number + viewOffset?: number + viewPosition?: number + }): void + scrollToItem(params: { + animated?: boolean + item: ItemT + viewOffset?: number + viewPosition?: number + }): void + scrollToOffset(params: { animated?: boolean; offset: number }): void + setNativeProps(props: { [$$Key$$: string]: unknown }): void +} +declare type FlatListBaseProps = RequiredFlatListProps & + OptionalFlatListProps +declare type FlatListProps = Omit< + VirtualizedListProps, + | "data" + | "getItem" + | "getItemCount" + | "getItemLayout" + | "keyExtractor" + | "renderItem" +> & + FlatListBaseProps +declare type flatten = typeof flatten +declare type FlattenDepthLimiter = [void, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +declare function flattenStyle_default< + TStyleProp extends ____DangerouslyImpreciseAnimatedStyleProp_Internal, +>( + style: null | TStyleProp | undefined, +): + | NonAnimatedNodeObject<____FlattenStyleProp_Internal> + | null + | undefined +declare type Float = number +declare type Fn, Return> = ( + ...$$REST$$: Args +) => Return +declare type FocusEvent = NativeSyntheticEvent +declare type FocusEventProps = { + readonly onBlur?: (event: BlurEvent) => void + readonly onBlurCapture?: (event: BlurEvent) => void + readonly onFocus?: (event: FocusEvent) => void + readonly onFocusCapture?: (event: FocusEvent) => void +} +declare type FontVariant = ____FontVariant_Internal +declare type forkEvent = typeof forkEvent +declare function forkEventImpl( + event: (AnimatedEvent | null | undefined) | (Function | null | undefined), + listener: Function, +): AnimatedEvent | Function +declare class FormData_default { + append(key: string, value: FormDataValue): void + constructor() + getAll(key: string): Array + getParts(): Array +} +declare type FormDataPart = + | { + headers: Headers + name?: string + type?: string + uri: string + } + | { + headers: Headers + string: string + } +declare type FormDataValue = + | string + | { + name?: string + type?: string + uri: string + } +declare type GestureResponderEvent = ResponderSyntheticEvent +declare type GestureResponderHandlerMethods = { + onMoveShouldSetResponder: (event: GestureResponderEvent) => boolean + onMoveShouldSetResponderCapture: (event: GestureResponderEvent) => boolean + onResponderEnd: (event: GestureResponderEvent) => void + onResponderGrant: (event: GestureResponderEvent) => boolean + onResponderMove: (event: GestureResponderEvent) => void + onResponderReject: (event: GestureResponderEvent) => void + onResponderRelease: (event: GestureResponderEvent) => void + onResponderStart: (event: GestureResponderEvent) => void + onResponderTerminate: (event: GestureResponderEvent) => void + onResponderTerminationRequest: (event: GestureResponderEvent) => boolean + onStartShouldSetResponder: (event: GestureResponderEvent) => boolean + onStartShouldSetResponderCapture: (event: GestureResponderEvent) => boolean +} +declare type GestureResponderHandlers = { + readonly onMoveShouldSetResponder?: (e: GestureResponderEvent) => boolean + readonly onMoveShouldSetResponderCapture?: ( + e: GestureResponderEvent, + ) => boolean + readonly onResponderEnd?: (e: GestureResponderEvent) => void + readonly onResponderGrant?: (e: GestureResponderEvent) => boolean | void + readonly onResponderMove?: (e: GestureResponderEvent) => void + readonly onResponderReject?: (e: GestureResponderEvent) => void + readonly onResponderRelease?: (e: GestureResponderEvent) => void + readonly onResponderStart?: (e: GestureResponderEvent) => void + readonly onResponderTerminate?: (e: GestureResponderEvent) => void + readonly onResponderTerminationRequest?: (e: GestureResponderEvent) => boolean + readonly onStartShouldSetResponder?: (e: GestureResponderEvent) => boolean + readonly onStartShouldSetResponderCapture?: ( + e: GestureResponderEvent, + ) => boolean +} +declare function get(name: string): null | T | undefined +declare function getAppKeys(): ReadonlyArray +declare function getColorScheme(): ColorSchemeName | null | undefined +declare function getEnforcing(name: string): T +declare function getRegistry(): Registry +declare function getRunnable(appKey: string): null | Runnable | undefined +declare function getSectionKeys(): ReadonlyArray +declare function getSections(): Runnables +declare type hairlineWidth = typeof hairlineWidth +declare type Handle = number +declare type Headers = { + [name: string]: string +} +declare type HeadlessTask = (taskData: any) => Promise +declare type HostComponent = ( + props: Omit & { + ref?: React.Ref + }, +) => React.ReactNode +declare type HostInstance = LegacyHostInstanceMethods +declare class HTMLCollection_default implements Iterable, ArrayLike_2 { + [index: number]: T + readonly length: number + item(index: number): null | T + namedItem(name: string): null | T + [Symbol.iterator](): Iterator +} +declare type I18nManager = typeof I18nManager +declare type I18nManagerConstants = { + doLeftAndRightSwapInRTL: boolean + isRTL: boolean + localeIdentifier?: string +} +declare interface IEventEmitter< + TEventToArgsMap extends Readonly< + Record> + >, +> { + addListener( + eventType: TEvent, + listener: (...args: TEventToArgsMap[TEvent]) => unknown, + context?: unknown, + ): EventSubscription + emit( + eventType: TEvent, + ...args: TEventToArgsMap[TEvent] + ): void + listenerCount(eventType: TEvent): number + removeAllListeners( + eventType?: TEvent | undefined, + ): void +} +declare type IgnorePattern = RegExp | string +declare interface ILogBox { + addConsoleLog(level: "error" | "warn", ...args: Array): void + addException(error: ExtendedExceptionData): void + addLog(log: LogData): void + clearAllLogs(): void + ignoreAllLogs(value?: boolean): void + ignoreLogs($$PARAM_0$$: ReadonlyArray): void + install(): void + isInstalled(): boolean + uninstall(): void +} +declare type Image = typeof Image +declare type ImageAndroid = AbstractImageAndroid & ImageComponentStaticsAndroid +declare class ImageBackground extends React.Component { + render(): React.ReactNode + setNativeProps(props: {}): void +} +declare type ImageBackgroundProps = Readonly< + Omit & { + children?: React.ReactNode + imageRef?: React.Ref> + imageStyle?: ImageStyleProp + style?: ViewStyleProp + } +> +declare type ImageComponentStaticsAndroid = Readonly< + ImageComponentStaticsIOS & { + abortPrefetch(requestId: number): void + } +> +declare type ImageComponentStaticsIOS = { + getSize(uri: string): Promise + getSize( + uri: string, + success: (width: number, height: number) => void, + failure?: (error: unknown) => void, + ): void + getSizeWithHeaders( + uri: string, + headers: { + [$$Key$$: string]: string + }, + ): Promise + getSizeWithHeaders( + uri: string, + headers: { + [$$Key$$: string]: string + }, + success: (width: number, height: number) => void, + failure?: (error: unknown) => void, + ): void + prefetch(url: string): Promise + prefetchWithMetadata( + url: string, + queryRootName: string, + rootTag?: RootTag | undefined, + ): Promise + queryCache(urls: Array): Promise<{ + [url: string]: "disk" | "disk/memory" | "memory" + }> + resolveAssetSource(source: ImageSource): ImageResolvedAssetSource | undefined +} +declare type ImageErrorEvent = NativeSyntheticEvent< + Readonly +> +declare type ImageErrorEventData = { + error: string +} +declare type ImageHostComponentProps = Readonly< + ImageProps & + Omit & { + defaultSource?: (ImageSource | undefined) | (string | undefined) + headers?: { + [$$Key$$: string]: string + } + loadingIndicatorSrc?: string + shouldNotifyLoadEvents?: boolean + src?: + | ( + | ReadonlyArray< + | undefined + | { + readonly uri?: string + } + > + | undefined + ) + | (ResolvedAssetSource | undefined) + style?: DangerouslyImpreciseStyle | ImageStyleProp + tintColor?: ColorValue + } +> +declare type ImageIOS = AbstractImageIOS & ImageComponentStaticsIOS +declare type ImageLoadEvent = NativeSyntheticEvent> +declare type ImageLoadEventData = { + source: { + height: number + uri: string + width: number + } +} +declare type ImageProgressEventDataIOS = { + loaded: number + total: number +} +declare type ImageProgressEventIOS = NativeSyntheticEvent< + Readonly +> +declare type ImageProps = Readonly< + ImagePropsIOS & + ImagePropsAndroid & + ImagePropsBase & { + style?: ImageStyleProp + } +> +declare type ImagePropsAndroid = { + readonly fadeDuration?: number + readonly loadingIndicatorSource?: number | Readonly + readonly progressiveRenderingEnabled?: boolean + readonly resizeMethod?: "auto" | "none" | "resize" | "scale" + readonly resizeMultiplier?: number +} +declare type ImagePropsBase = Readonly< + Omit< + Omit, + | "accessibilityLabel" + | "accessible" + | "aria-label" + | "aria-labelledby" + | "children" + | "onLayout" + | "testID" + > & { + accessibilityLabel?: string + accessible?: boolean + alt?: string + "aria-label"?: string + "aria-labelledby"?: string + blurRadius?: number + capInsets?: EdgeInsetsProp + children?: never + crossOrigin?: "anonymous" | "use-credentials" + height?: number + internal_analyticTag?: string + onError?: (event: ImageErrorEvent) => void + onLayout?: (event: LayoutChangeEvent) => unknown + onLoad?: (event: ImageLoadEvent) => void + onLoadEnd?: () => void + onLoadStart?: () => void + referrerPolicy?: + | "no-referrer-when-downgrade" + | "no-referrer" + | "origin-when-cross-origin" + | "origin" + | "same-origin" + | "strict-origin-when-cross-origin" + | "strict-origin" + | "unsafe-url" + resizeMode?: ImageResizeMode + source?: ImageSource + src?: string + srcSet?: string + testID?: string + tintColor?: ColorValue + width?: number + } +> +declare type ImagePropsIOS = { + readonly defaultSource?: ImageSource + readonly onPartialLoad?: () => void + readonly onProgress?: (event: ImageProgressEventIOS) => void +} +declare type ImageRequireSource = number +declare type ImageResizeMode = + | "center" + | "contain" + | "cover" + | "none" + | "repeat" + | "stretch" +declare type ImageResolvedAssetSource = ResolvedAssetSource +declare type ImageSize = { + height: number + width: number +} +declare type ImageSource = + | ImageRequireSource + | ImageURISource + | ReadonlyArray +declare type ImageSourcePropType = ImageSource +declare type ImageStyle = ____ImageStyle_Internal +declare type ImageStyleProp = ____ImageStyleProp_Internal +declare type ImageType = ImageAndroid | ImageIOS +declare interface ImageURISource { + readonly body?: string + readonly bundle?: string + readonly cache?: "default" | "force-cache" | "only-if-cached" | "reload" + readonly headers?: { + [$$Key$$: string]: string + } + readonly height?: number + readonly method?: string + readonly scale?: number + readonly uri?: string + readonly width?: number +} +declare type ImageViewNativeComponent = typeof $$ImageViewNativeComponent +declare type IndeterminateProgressBarAndroidStyleAttrProp = { + indeterminate: true + styleAttr: + | "Horizontal" + | "Inverse" + | "Large" + | "LargeInverse" + | "Normal" + | "Small" + | "SmallInverse" +} +declare type IndicatorSize = "large" | "small" | number +declare class Info { + any_blank_count: number + any_blank_ms: number + any_blank_speed_sum: number + mostly_blank_count: number + mostly_blank_ms: number + pixels_blank: number + pixels_sampled: number + pixels_scrolled: number + sample_count: number + total_time_spent: number +} +declare type InnerViewInstance = React.ComponentRef +declare type InputAccessoryView = typeof InputAccessoryView +declare type InputAccessoryViewProps = { + readonly backgroundColor?: ColorValue + readonly children: React.ReactNode + readonly nativeID?: string + readonly style?: ViewStyleProp +} +declare type InputModeOptions = + | "decimal" + | "email" + | "none" + | "numeric" + | "search" + | "tel" + | "text" + | "url" +declare type InputValue = + | (ColorValue | RgbaAnimatedValue | RgbaValue) + | null + | undefined +declare type Insets = Rect +declare type InstanceHandle = + | InternalInstanceHandle + | ReactNativeDocumentElementInstanceHandle + | ReactNativeDocumentInstanceHandle +declare type Int32 = number +declare type InteractionManager = typeof InteractionManager +declare type InternalInstanceHandle = symbol & { + __InternalInstanceHandle__: string +} +declare type InternalTextInput = ( + props: TextInputProps & { + ref?: React.Ref + }, +) => React.ReactNode +declare type InterpolationConfigType = + Readonly< + AnimatedNodeConfig & { + extrapolate?: ExtrapolateType + extrapolateLeft?: ExtrapolateType + extrapolateRight?: ExtrapolateType + inputRange: ReadonlyArray + outputRange: ReadonlyArray + easing?: (input: number) => number + } + > +declare type IOSKeyboardEvent = Readonly< + BaseKeyboardEvent & { + isEventFromThisApp: boolean + startCoordinates: KeyboardMetrics + } +> +declare type IOSPlatform = { + OS: "ios" + select: (spec: PlatformSelectSpec) => T + get constants(): { + forceTouchAvailable: boolean + interfaceIdiom: string + isDisableAnimations?: boolean + isMacCatalyst?: boolean + isTesting: boolean + osVersion: string + reactNativeVersion: { + major: number + minor: number + patch: number + prerelease: string | undefined + } + systemName: string + } + get isDisableAnimations(): boolean + get isMacCatalyst(): boolean + get isPad(): boolean + get isTesting(): boolean + get isTV(): boolean + get isVision(): boolean + get Version(): string +} +declare type IOSProps = { + readonly hasTVPreferredFocus?: boolean +} +declare interface IPerformanceLogger { + addTimespan( + key: string, + startTime: number, + endTime: number, + startExtras?: Extras, + endExtras?: Extras, + ): void + append(logger: IPerformanceLogger): void + clear(): void + clearCompleted(): void + close(): void + currentTimestamp(): number + getExtras(): { + readonly [key: string]: ExtraValue | undefined + } + getPointExtras(): { + readonly [key: string]: Extras | undefined + } + getPoints(): { + readonly [key: string]: number | undefined + } + getTimespans(): { + readonly [key: string]: Timespan | undefined + } + hasTimespan(key: string): boolean + isClosed(): boolean + logEverything(): void + markPoint(key: string, timestamp?: number, extras?: Extras): void + removeExtra(key: string): ExtraValue | undefined + setExtra(key: string, value: ExtraValue): void + startTimespan(key: string, timestamp?: number, extras?: Extras): void + stopTimespan(key: string, timestamp?: number, extras?: Extras): void +} +declare function isEnabled(): boolean +declare type Item = any +declare type Keyboard = typeof Keyboard +declare class KeyboardAvoidingView extends React.Component< + KeyboardAvoidingViewProps, + KeyboardAvoidingViewState +> { + viewRef: { + current: null | React.ComponentRef + } + componentDidMount(): void + componentDidUpdate( + _: KeyboardAvoidingViewProps, + prevState: KeyboardAvoidingViewState, + ): void + componentWillUnmount(): void + constructor(props: KeyboardAvoidingViewProps) + render(): React.ReactNode +} +declare type KeyboardAvoidingViewProps = Readonly< + ViewProps & { + behavior?: "height" | "padding" | "position" + contentContainerStyle?: ViewStyleProp + enabled?: boolean + keyboardVerticalOffset?: number + } +> +declare type KeyboardAvoidingViewState = { + bottom: number +} +declare type KeyboardEvent = AndroidKeyboardEvent | IOSKeyboardEvent +declare type KeyboardEventDefinitions = { + keyboardDidChangeFrame: [KeyboardEvent] + keyboardDidHide: [KeyboardEvent] + keyboardDidShow: [KeyboardEvent] + keyboardWillChangeFrame: [KeyboardEvent] + keyboardWillHide: [KeyboardEvent] + keyboardWillShow: [KeyboardEvent] +} +declare type KeyboardEventEasing = + | "easeIn" + | "easeInEaseOut" + | "easeOut" + | "keyboard" + | "linear" +declare type KeyboardEventName = keyof KeyboardEventDefinitions +declare class KeyboardImpl { + addListener( + eventType: K, + listener: (...$$REST$$: KeyboardEventDefinitions[K]) => unknown, + context?: unknown, + ): EventSubscription + constructor() + dismiss(): void + isVisible(): boolean + metrics(): KeyboardMetrics | null | undefined + removeAllListeners( + eventType: K | null | undefined, + ): void + scheduleLayoutAnimation(event: KeyboardEvent): void +} +declare type KeyboardMetrics = { + readonly height: number + readonly screenX: number + readonly screenY: number + readonly width: number +} +declare type KeyboardType = + | "decimal-pad" + | "default" + | "email-address" + | "number-pad" + | "numeric" + | "phone-pad" + | "url" +declare type KeyboardTypeAndroid = "visible-password" +declare type KeyboardTypeIOS = + | "ascii-capable-number-pad" + | "ascii-capable" + | "name-phone-pad" + | "numbers-and-punctuation" + | "twitter" + | "web-search" +declare type KeyboardTypeOptions = + | KeyboardType + | KeyboardTypeAndroid + | KeyboardTypeIOS +declare function keyExtractor(item: any, index: number): string +declare type KeysOfUnion = T extends any ? keyof T : never +declare type LayoutAnimation = typeof LayoutAnimation +declare type LayoutAnimationAnim = { + readonly delay?: number + readonly duration?: number + readonly initialVelocity?: number + readonly property?: LayoutAnimationProperty + readonly springDamping?: number + readonly type?: LayoutAnimationType +} +declare type LayoutAnimationConfig = { + readonly create?: LayoutAnimationAnim + readonly delete?: LayoutAnimationAnim + readonly duration: number + readonly update?: LayoutAnimationAnim +} +declare type LayoutAnimationProperties = Readonly<{ + [prop in LayoutAnimationProperty]: prop +}> +declare type LayoutAnimationProperty = + | "opacity" + | "scaleX" + | "scaleXY" + | "scaleY" +declare type LayoutAnimationType = + | "easeIn" + | "easeInEaseOut" + | "easeOut" + | "keyboard" + | "linear" + | "spring" +declare type LayoutAnimationTypes = Readonly<{ + [type in LayoutAnimationType]: type +}> +declare type LayoutChangeEvent = NativeSyntheticEvent<{ + readonly layout: LayoutRectangle +}> +declare type LayoutConformanceProps = { + readonly children: React.ReactNode + readonly mode: "compatibility" | "strict" +} +declare type LayoutRectangle = { + readonly height: number + readonly width: number + readonly x: number + readonly y: number +} +declare interface LegacyHostInstanceMethods { + blur(): void + focus(): void + measure(callback: MeasureOnSuccessCallback): void + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void + measureLayout( + relativeToNativeNode: HostInstance | number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail?: () => void, + ): void + setNativeProps(nativeProps: {}): void +} +declare type Linking = typeof Linking +declare type LinkingEventDefinitions = { + url: [ + { + url: string + }, + ] +} +declare class LinkingImpl extends NativeEventEmitter { + addEventListener( + eventType: K, + listener: (...$$REST$$: LinkingEventDefinitions[K]) => unknown, + ): EventSubscription + canOpenURL(url: string): Promise + constructor() + getInitialURL(): Promise + openSettings(): Promise + openURL(url: string): Promise + sendIntent( + action: string, + extras?: Array<{ + key: string + value: boolean | number | string + }>, + ): Promise +} +declare class ListMetricsAggregator_default { + cartesianOffset(flowRelativeOffset: number): number + flowRelativeOffset( + layout: LayoutRectangle, + referenceContentLength?: null | number | undefined, + ): number + getAverageCellLength(): number + getCellMetrics( + index: number, + props: CellMetricProps, + ): CellMetrics | null | undefined + getCellMetricsApprox(index: number, props: CellMetricProps): CellMetrics + getCellOffsetApprox(index: number, props: CellMetricProps): number + getContentLength(): number + getHighestMeasuredCellIndex(): number + hasContentLength(): boolean + notifyCellLayout($$PARAM_0$$: { + cellIndex: number + cellKey: string + layout: LayoutRectangle + orientation: ListOrientation + }): boolean + notifyCellUnmounted(cellKey: string): void + notifyListContentLayout($$PARAM_0$$: { + layout: { + readonly height: number + readonly width: number + } + orientation: ListOrientation + }): void +} +declare type ListOrientation = { + horizontal: boolean + rtl: boolean +} +declare type ListRenderItem = ( + info: ListRenderItemInfo, +) => React.ReactNode +declare type ListRenderItemInfo = { + index: number + item: ItemT + separators: Separators +} +declare type LogBox = typeof LogBox +declare type LogData = { + readonly category: Category + readonly componentStack: ComponentStack + readonly componentStackType: ComponentStackType | null + readonly level: LogLevel + readonly message: Message + readonly stack?: string +} +declare type LogLevel = "error" | "fatal" | "syntax" | "warn" +declare type loop = typeof loop +declare type LoopAnimationConfig = { + iterations: number + resetBeforeIteration?: boolean +} +declare type MacOSPlatform = { + OS: "macos" + select: (spec: PlatformSelectSpec) => T + get constants(): { + isTesting: boolean + osVersion: string + reactNativeVersion: { + major: number + minor: number + patch: number + prerelease: number | undefined + } + systemName: string + } + get isDisableAnimations(): boolean + get isTesting(): boolean + get isTV(): boolean + get isVision(): boolean + get Version(): string +} +declare type Mapping = + | AnimatedValue_default + | AnimatedValueXY_default + | { + [key: string]: Mapping + } +declare type MaximumOneOf = { + [K in keyof T]: { [P in keyof T]?: P extends K ? T[P] : never } +}[keyof { [K in keyof T]: { [P in keyof T]?: P extends K ? T[P] : never } }] +declare type MeasureInWindowOnSuccessCallback = ( + x: number, + y: number, + width: number, + height: number, +) => void +declare type MeasureLayoutOnSuccessCallback = ( + left: number, + top: number, + width: number, + height: number, +) => void +declare type MeasureOnSuccessCallback = ( + x: number, + y: number, + width: number, + height: number, + pageX: number, + pageY: number, +) => void +declare type MergeUnion = { [K in KeysOfUnion]?: ValueOfUnion } +declare type Message = { + readonly content: string + readonly substitutions: ReadonlyArray<{ + readonly length: number + readonly offset: number + }> +} +declare type Modal = typeof Modal +declare type ModalBaseProps = { + animated?: boolean + animationType?: "fade" | "none" | "slide" + backdropColor?: ColorValue + modalRef?: React.Ref + onRequestClose?: DirectEventHandler + onShow?: DirectEventHandler + transparent?: boolean + visible?: boolean +} +declare type ModalProps = ModalBaseProps & + ModalPropsIOS & + ModalPropsAndroid & + ViewProps +declare type ModalPropsAndroid = { + hardwareAccelerated?: boolean + navigationBarTranslucent?: boolean + statusBarTranslucent?: boolean +} +declare type ModalPropsIOS = { + allowSwipeDismissal?: boolean + onDismiss?: () => void + onOrientationChange?: DirectEventHandler + presentationStyle?: + | "formSheet" + | "fullScreen" + | "overFullScreen" + | "pageSheet" + supportedOrientations?: ReadonlyArray< + | "landscape-left" + | "landscape-right" + | "landscape" + | "portrait-upside-down" + | "portrait" + > +} +declare type ModalRefProps = { + readonly ref?: React.Ref +} +declare type ModeChangeEvent = Readonly< + Omit & { + mode: VirtualViewMode + target: ReadOnlyElement_default + } +> +declare type Module = {} +declare type modulo = typeof modulo +declare type MouseEvent = NativeSyntheticEvent<{ + readonly clientX: number + readonly clientY: number + readonly pageX: number + readonly pageY: number + readonly timestamp: number +}> +declare type MouseEventProps = { + readonly onMouseEnter?: (event: MouseEvent) => void + readonly onMouseLeave?: (event: MouseEvent) => void +} +declare type multiply = typeof multiply +declare type NativeAppEventEmitter = typeof NativeAppEventEmitter +declare type NativeColorValue = symbol & { + __NativeColorValue__: string +} +declare type NativeCommandsOptions = { + readonly supportedCommands: ReadonlyArray +} +declare type NativeComponentOptions = { + readonly excludedPlatforms?: ReadonlyArray<"android" | "iOS"> + readonly interfaceOnly?: boolean + readonly paperComponentName?: string + readonly paperComponentNameDeprecated?: string +} +declare type NativeComponentType = HostComponent +declare type NativeDialogManagerAndroid = typeof NativeDialogManagerAndroid +declare class NativeEventEmitter< + TEventToArgsMap extends Readonly< + Record> + > = Readonly>>, +> implements IEventEmitter +{ + addListener( + eventType: TEvent, + listener: (...args: TEventToArgsMap[TEvent]) => unknown, + context?: unknown, + ): EventSubscription + constructor(nativeModule?: NativeModule | null | undefined) + emit( + eventType: TEvent, + ...args: TEventToArgsMap[TEvent] + ): void + listenerCount(eventType: TEvent): number + removeAllListeners( + eventType?: null | TEvent | undefined, + ): void +} +declare type NativeEventSubscription = EventSubscription +declare type NativeMeasureInWindowOnSuccessCallback = ( + x: number, + y: number, + width: number, + height: number, +) => void +declare type NativeMeasureLayoutOnSuccessCallback = ( + left: number, + top: number, + width: number, + height: number, +) => void +declare type NativeMeasureOnSuccessCallback = ( + x: number, + y: number, + width: number, + height: number, + pageX: number, + pageY: number, +) => void +declare type NativeMethods = LegacyHostInstanceMethods +declare type NativeMethodsMixin = LegacyHostInstanceMethods +declare type NativeModeChangeEvent = { + readonly mode: Int32 + readonly targetRect: { + readonly height: Double + readonly width: Double + readonly x: Double + readonly y: Double + } + readonly thresholdRect: { + readonly height: Double + readonly width: Double + readonly x: Double + readonly y: Double + } +} +declare interface NativeModule { + addListener(eventType: string): void + removeListeners(count: number): void +} +declare type NativeModules = typeof NativeModules +declare interface NativeMouseEvent extends NativeUIEvent { + readonly altKey: boolean + readonly button: number + readonly buttons: number + readonly clientX: number + readonly clientY: number + readonly ctrlKey: boolean + readonly metaKey: boolean + readonly offsetX: number + readonly offsetY: number + readonly pageX: number + readonly pageY: number + readonly relatedTarget: HostInstance | null | number + readonly screenX: number + readonly screenY: number + readonly shiftKey: boolean + readonly x: number + readonly y: number +} +declare interface NativePointerEvent extends NativeMouseEvent { + readonly height: number + readonly isPrimary: boolean + readonly pointerId: number + readonly pointerType: string + readonly pressure: number + readonly tangentialPressure: number + readonly tiltX: number + readonly tiltY: number + readonly twist: number + readonly width: number +} +declare type NativeResponseType = "base64" | "blob" | "text" +declare type NativeScrollEvent = { + readonly contentInset: NativeScrollRectangle + readonly contentOffset: NativeScrollPoint + readonly contentSize: NativeScrollSize + readonly layoutMeasurement: NativeScrollSize + readonly responderIgnoreScroll?: boolean + readonly targetContentOffset?: NativeScrollPoint + readonly velocity?: NativeScrollVelocity + readonly zoomScale?: number +} +declare type NativeScrollPoint = { + readonly x: number + readonly y: number +} +declare type NativeScrollRectangle = { + readonly bottom: number + readonly left: number + readonly right: number + readonly top: number +} +declare type NativeScrollSize = { + readonly height: number + readonly width: number +} +declare type NativeScrollVelocity = { + readonly x: number + readonly y: number +} +declare type NativeSwitchChangeEvent = { + readonly target: Int32 + readonly value: boolean +} +declare type NativeSyntheticEvent = { + readonly bubbles: boolean | undefined + readonly cancelable: boolean | undefined + readonly currentTarget: HostInstance | number + readonly defaultPrevented: boolean | undefined + readonly dispatchConfig: { + readonly registrationName: string + } + readonly eventPhase: number | undefined + readonly isTrusted: boolean | undefined + readonly nativeEvent: T + readonly target: (number | undefined) | HostInstance + readonly timeStamp: number + readonly type: string | undefined + readonly isDefaultPrevented: () => boolean + readonly isPropagationStopped: () => boolean + readonly persist: () => void + readonly preventDefault: () => void + readonly stopPropagation: () => void +} +declare type NativeText = typeof NativeText +declare type NativeTextProps = Readonly< + Omit & { + isHighlighted?: boolean + isPressable?: boolean + onClick?: (event: GestureResponderEvent) => unknown + selectionColor?: ProcessedColorValue + } +> +declare type NativeTouchEvent = { + readonly changedTouches: ReadonlyArray + readonly force?: number + readonly identifier: number + readonly locationX: number + readonly locationY: number + readonly pageX: number + readonly pageY: number + readonly target: number | undefined + readonly timestamp: number + readonly touches: ReadonlyArray +} +declare type NativeType = HostComponent +declare interface NativeUIEvent { + readonly detail: number +} +declare type NativeVirtualText = typeof NativeVirtualText +declare type Networking = typeof Networking +declare class NodeList_default implements Iterable, ArrayLike_2 { + [index: number]: T + readonly length: number + entries(): Iterator<[number, T]> + forEach( + callbackFn: ( + value: T, + index: number, + array: NodeList_default, + ) => unknown, + thisArg?: ThisType, + ): void + item(index: number): null | T + keys(): Iterator + values(): Iterator + [Symbol.iterator](): Iterator +} +declare type NonAnimatedNodeObject = + TStyleProp extends AnimatedNode_default ? never : TStyleProp +declare type NonAnimatedProps = + | "accessibilityLabel" + | "disabled" + | "innerViewRef" + | "ref" + | "scrollViewRef" + | "testID" +declare type Nullable = null | void +declare type Omit_2 = T extends any ? Pick> : T +declare type OnAnimationDidEndCallback = () => void +declare type OnAnimationDidFailCallback = () => void +declare type OpaqueColorValue = NativeColorValue +declare type OptionalFlatListProps = { + columnWrapperStyle?: ViewStyleProp + extraData?: any + fadingEdgeLength?: + | (number | undefined) + | { + end: number + start: number + } + horizontal?: boolean + initialNumToRender?: number + initialScrollIndex?: number + inverted?: boolean + keyExtractor?: (item: ItemT, index: number) => string + numColumns?: number + removeClippedSubviews?: boolean + renderItem?: ListRenderItem + strictMode?: boolean + getItemLayout?: ( + data: Readonly> | undefined, + index: number, + ) => { + index: number + length: number + offset: number + } +} +declare type OptionalPlatformSelectSpec = { [key in PlatformOSType]?: T } +declare type OptionalSectionListProps = { + extraData?: any + initialNumToRender?: number + inverted?: boolean + keyExtractor?: (item: ItemT, index: number) => string + onEndReached?: (info: { distanceFromEnd: number }) => void + removeClippedSubviews?: boolean + renderItem?: SectionListRenderItem +} +declare type OptionalVirtualizedListProps = { + CellRendererComponent?: React.ComponentType> + debug?: boolean + disableVirtualization?: boolean + extraData?: any + horizontal?: boolean + initialNumToRender?: number + initialScrollIndex?: number + inverted?: boolean + ItemSeparatorComponent?: React.ComponentType + keyExtractor?: (item: Item, index: number) => string + ListEmptyComponent?: React.ComponentType | React.JSX.Element + ListFooterComponent?: React.ComponentType | React.JSX.Element + ListFooterComponentStyle?: StyleProp + ListHeaderComponent?: React.ComponentType | React.JSX.Element + ListHeaderComponentStyle?: StyleProp + ListItemComponent?: React.ComponentType | React.JSX.Element + maxToRenderPerBatch?: number + onEndReached?: (info: { distanceFromEnd: number }) => void + onEndReachedThreshold?: number + onRefresh?: () => void + onScrollToIndexFailed?: (info: { + averageItemLength: number + highestMeasuredFrameIndex: number + index: number + }) => void + onStartReached?: (info: { distanceFromStart: number }) => void + onStartReachedThreshold?: number + onViewableItemsChanged?: (info: { + changed: Array + viewableItems: Array + }) => void + persistentScrollbar?: boolean + progressViewOffset?: number + refreshControl?: React.JSX.Element + refreshing?: boolean + removeClippedSubviews?: boolean + renderItem?: ListRenderItem + updateCellsBatchingPeriod?: number + viewabilityConfig?: ViewabilityConfig + viewabilityConfigCallbackPairs?: Array + windowSize?: number + getItemLayout?: ( + data: any, + index: number, + ) => { + index: number + length: number + offset: number + } + renderScrollComponent?: (props: ScrollViewProps) => React.JSX.Element +} +declare type OptionalVirtualizedSectionListProps< + ItemT, + SectionT = DefaultVirtualizedSectionT, +> = { + onEndReached?: ($$PARAM_0$$: { distanceFromEnd: number }) => void + renderSectionFooter?: (info: { section: SectionT }) => null | React.ReactNode + renderSectionHeader?: (info: { section: SectionT }) => null | React.ReactNode + SectionSeparatorComponent?: React.ComponentType + stickySectionHeadersEnabled?: boolean + renderItem?: (info: { + index: number + item: ItemT + section: SectionT + separators: { + highlight: () => void + unhighlight: () => void + updateProps: (select: "leading" | "trailing", newProps: Object) => void + } + }) => null | React.ReactNode +} +declare type OrientationChangeEvent = { + readonly orientation: "landscape" | "portrait" +} +declare type PanResponder = typeof PanResponder +declare type PanResponderCallbacks = { + readonly onMoveShouldSetPanResponder?: ActiveCallback + readonly onMoveShouldSetPanResponderCapture?: ActiveCallback + readonly onPanResponderEnd?: PassiveCallback + readonly onPanResponderGrant?: ActiveCallback | PassiveCallback + readonly onPanResponderMove?: PassiveCallback + readonly onPanResponderReject?: PassiveCallback + readonly onPanResponderRelease?: PassiveCallback + readonly onPanResponderStart?: PassiveCallback + readonly onPanResponderTerminate?: PassiveCallback + readonly onPanResponderTerminationRequest?: ActiveCallback + readonly onShouldBlockNativeResponder?: ActiveCallback + readonly onStartShouldSetPanResponder?: ActiveCallback + readonly onStartShouldSetPanResponderCapture?: ActiveCallback +} +declare type PanResponderGestureState = { + dx: number + dy: number + moveX: number + moveY: number + numberActiveTouches: number + stateID: number + vx: number + vy: number + x0: number + y0: number +} +declare type PanResponderInstance = ReturnType< + (typeof PanResponder_default)["create"] +> +declare type parallel = typeof parallel +declare type ParallelConfig = { + stopTogether?: boolean +} +declare type PassiveCallback = ( + event: GestureResponderEvent, + gestureState: PanResponderGestureState, +) => unknown +declare type PassThroughProps = { + readonly passthroughAnimatedPropExplicitValues?: null | ViewProps +} +declare type PasswordRules = string +declare type Permission = PermissionsType[keyof PermissionsType] +declare type PermissionsAndroid = typeof PermissionsAndroid +declare class PermissionsAndroidImpl { + PERMISSIONS: PermissionsType + RESULTS: { + readonly DENIED: "denied" + readonly GRANTED: "granted" + readonly NEVER_ASK_AGAIN: "never_ask_again" + } + check(permission: Permission): Promise + checkPermission(permission: Permission): Promise + request( + permission: Permission, + rationale?: Rationale, + ): Promise + requestMultiple( + permissions: Array, + ): Promise<{ [permission in Permission]: PermissionStatus }> + requestPermission( + permission: Permission, + rationale?: Rationale, + ): Promise +} +declare type PermissionStatus = "denied" | "granted" | "never_ask_again" +declare type PermissionsType = { + readonly ACCEPT_HANDOVER: "android.permission.ACCEPT_HANDOVER" + readonly ACCESS_BACKGROUND_LOCATION: "android.permission.ACCESS_BACKGROUND_LOCATION" + readonly ACCESS_COARSE_LOCATION: "android.permission.ACCESS_COARSE_LOCATION" + readonly ACCESS_FINE_LOCATION: "android.permission.ACCESS_FINE_LOCATION" + readonly ACCESS_MEDIA_LOCATION: "android.permission.ACCESS_MEDIA_LOCATION" + readonly ACTIVITY_RECOGNITION: "android.permission.ACTIVITY_RECOGNITION" + readonly ADD_VOICEMAIL: "com.android.voicemail.permission.ADD_VOICEMAIL" + readonly ANSWER_PHONE_CALLS: "android.permission.ANSWER_PHONE_CALLS" + readonly BLUETOOTH_ADVERTISE: "android.permission.BLUETOOTH_ADVERTISE" + readonly BLUETOOTH_CONNECT: "android.permission.BLUETOOTH_CONNECT" + readonly BLUETOOTH_SCAN: "android.permission.BLUETOOTH_SCAN" + readonly BODY_SENSORS: "android.permission.BODY_SENSORS" + readonly BODY_SENSORS_BACKGROUND: "android.permission.BODY_SENSORS_BACKGROUND" + readonly CALL_PHONE: "android.permission.CALL_PHONE" + readonly CAMERA: "android.permission.CAMERA" + readonly GET_ACCOUNTS: "android.permission.GET_ACCOUNTS" + readonly NEARBY_WIFI_DEVICES: "android.permission.NEARBY_WIFI_DEVICES" + readonly POST_NOTIFICATIONS: "android.permission.POST_NOTIFICATIONS" + readonly PROCESS_OUTGOING_CALLS: "android.permission.PROCESS_OUTGOING_CALLS" + readonly READ_CALENDAR: "android.permission.READ_CALENDAR" + readonly READ_CALL_LOG: "android.permission.READ_CALL_LOG" + readonly READ_CONTACTS: "android.permission.READ_CONTACTS" + readonly READ_EXTERNAL_STORAGE: "android.permission.READ_EXTERNAL_STORAGE" + readonly READ_MEDIA_AUDIO: "android.permission.READ_MEDIA_AUDIO" + readonly READ_MEDIA_IMAGES: "android.permission.READ_MEDIA_IMAGES" + readonly READ_MEDIA_VIDEO: "android.permission.READ_MEDIA_VIDEO" + readonly READ_MEDIA_VISUAL_USER_SELECTED: "android.permission.READ_MEDIA_VISUAL_USER_SELECTED" + readonly READ_PHONE_NUMBERS: "android.permission.READ_PHONE_NUMBERS" + readonly READ_PHONE_STATE: "android.permission.READ_PHONE_STATE" + readonly READ_SMS: "android.permission.READ_SMS" + readonly READ_VOICEMAIL: "com.android.voicemail.permission.READ_VOICEMAIL" + readonly RECEIVE_MMS: "android.permission.RECEIVE_MMS" + readonly RECEIVE_SMS: "android.permission.RECEIVE_SMS" + readonly RECEIVE_WAP_PUSH: "android.permission.RECEIVE_WAP_PUSH" + readonly RECORD_AUDIO: "android.permission.RECORD_AUDIO" + readonly SEND_SMS: "android.permission.SEND_SMS" + readonly USE_SIP: "android.permission.USE_SIP" + readonly UWB_RANGING: "android.permission.UWB_RANGING" + readonly WRITE_CALENDAR: "android.permission.WRITE_CALENDAR" + readonly WRITE_CALL_LOG: "android.permission.WRITE_CALL_LOG" + readonly WRITE_CONTACTS: "android.permission.WRITE_CONTACTS" + readonly WRITE_EXTERNAL_STORAGE: "android.permission.WRITE_EXTERNAL_STORAGE" + readonly WRITE_VOICEMAIL: "com.android.voicemail.permission.WRITE_VOICEMAIL" +} +declare class PixelRatio { + static get(): number + static getFontScale(): number + static getPixelSizeForLayoutSize(layoutSize: number): number + static roundToNearestPixel(layoutSize: number): number + static startDetecting(): void +} +declare type Platform = typeof Platform +declare function PlatformColor(...names: Array): ColorValue +declare type PlatformConfig = {} +declare type PlatformOSType = + | "android" + | "ios" + | "macos" + | "native" + | "web" + | "windows" +declare type PlatformSelectSpec = + | (Omit, "default"> & { + default: T + }) + | OptionalPlatformSelectSpec +declare type PlatformType = + | AndroidPlatform + | IOSPlatform + | MacOSPlatform + | WebPlatform + | WindowsPlatform +declare type PointerEvent = NativeSyntheticEvent +declare type PointerEventProps = { + readonly onClick?: (event: PointerEvent) => void + readonly onClickCapture?: (event: PointerEvent) => void + readonly onGotPointerCapture?: (e: PointerEvent) => void + readonly onGotPointerCaptureCapture?: (e: PointerEvent) => void + readonly onLostPointerCapture?: (e: PointerEvent) => void + readonly onLostPointerCaptureCapture?: (e: PointerEvent) => void + readonly onPointerCancel?: (e: PointerEvent) => void + readonly onPointerCancelCapture?: (e: PointerEvent) => void + readonly onPointerDown?: (e: PointerEvent) => void + readonly onPointerDownCapture?: (e: PointerEvent) => void + readonly onPointerEnter?: (event: PointerEvent) => void + readonly onPointerEnterCapture?: (event: PointerEvent) => void + readonly onPointerLeave?: (event: PointerEvent) => void + readonly onPointerLeaveCapture?: (event: PointerEvent) => void + readonly onPointerMove?: (event: PointerEvent) => void + readonly onPointerMoveCapture?: (event: PointerEvent) => void + readonly onPointerOut?: (e: PointerEvent) => void + readonly onPointerOutCapture?: (e: PointerEvent) => void + readonly onPointerOver?: (e: PointerEvent) => void + readonly onPointerOverCapture?: (e: PointerEvent) => void + readonly onPointerUp?: (e: PointerEvent) => void + readonly onPointerUpCapture?: (e: PointerEvent) => void +} +declare type PointProp = { + readonly x: number + readonly y: number +} +declare type PointValue = { + x: number + y: number +} +declare type PresentLocalNotificationDetails = { + alertAction?: string + alertBody: string + alertTitle?: string + applicationIconBadgeNumber?: number + category?: string + fireDate?: number + isSilent?: boolean + soundName?: string + userInfo?: Object +} +declare class Pressability_default { + configure(config: PressabilityConfig): void + constructor(config: PressabilityConfig) + getEventHandlers(): EventHandlers + reset(): void + static setLongPressDeactivationDistance(distance: number): void +} +declare type PressabilityConfig = { + readonly android_disableSound?: boolean + readonly blockNativeResponder?: boolean + readonly cancelable?: boolean + readonly delayHoverIn?: number + readonly delayHoverOut?: number + readonly delayLongPress?: number + readonly delayPressIn?: number + readonly delayPressOut?: number + readonly disabled?: boolean + readonly hitSlop?: RectOrSize + readonly minPressDuration?: number + readonly onBlur?: (event: BlurEvent) => unknown + readonly onFocus?: (event: FocusEvent) => unknown + readonly onHoverIn?: (event: MouseEvent) => unknown + readonly onHoverOut?: (event: MouseEvent) => unknown + readonly onLongPress?: (event: GestureResponderEvent) => unknown + readonly onPress?: (event: GestureResponderEvent) => unknown + readonly onPressIn?: (event: GestureResponderEvent) => unknown + readonly onPressMove?: (event: GestureResponderEvent) => unknown + readonly onPressOut?: (event: GestureResponderEvent) => unknown + readonly pressRectOffset?: RectOrSize +} +declare type Pressable = typeof Pressable +declare type PressableAndroidRippleConfig = { + borderless?: boolean + color?: ColorValue + foreground?: boolean + radius?: number +} +declare type PressableBaseProps = { + readonly android_disableSound?: boolean + readonly android_ripple?: PressableAndroidRippleConfig + readonly cancelable?: boolean + readonly children?: + | ((state: PressableStateCallbackType) => React.ReactNode) + | React.ReactNode + readonly delayHoverIn?: number + readonly delayHoverOut?: number + readonly delayLongPress?: number + readonly disabled?: boolean + readonly hitSlop?: RectOrSize + readonly onHoverIn?: (event: MouseEvent) => unknown + readonly onHoverOut?: (event: MouseEvent) => unknown + readonly onLayout?: (event: LayoutChangeEvent) => unknown + readonly onLongPress?: (event: GestureResponderEvent) => unknown + readonly onPress?: (event: GestureResponderEvent) => unknown + readonly onPressIn?: (event: GestureResponderEvent) => unknown + readonly onPressMove?: (event: GestureResponderEvent) => unknown + readonly onPressOut?: (event: GestureResponderEvent) => unknown + readonly pressRetentionOffset?: RectOrSize + readonly style?: + | ((state: PressableStateCallbackType) => ViewStyleProp) + | ViewStyleProp + readonly testID?: string + readonly testOnly_pressed?: boolean +} +declare type PressableProps = Readonly< + Omit & PressableBaseProps +> +declare type PressableStateCallbackType = { + readonly pressed: boolean +} +declare type PressRetentionOffset = { + readonly bottom: number + readonly left: number + readonly right: number + readonly top: number +} +declare type Primitive = boolean | number | string | symbol | void +declare type processColor = typeof processColor +declare function processColor_default( + color?: (ColorValue | number) | null | undefined, +): null | ProcessedColorValue | undefined +declare type ProcessedColorValue = NativeColorValue | number +declare type ProgressBarAndroid = typeof ProgressBarAndroid +declare type ProgressBarAndroidBaseProps = { + readonly animating?: boolean + readonly color?: ColorValue + readonly testID?: string +} +declare type ProgressBarAndroidNativeComponentType = + typeof $$ProgressBarAndroidNativeComponent +declare type ProgressBarAndroidProps = + | Readonly< + ViewProps & + ProgressBarAndroidBaseProps & + DeterminateProgressBarAndroidStyleAttrProp + > + | Readonly< + ViewProps & + ProgressBarAndroidBaseProps & + IndeterminateProgressBarAndroidStyleAttrProp + > +declare type PromiseTask = { + name: string + gen: () => Promise +} +declare type PublicModalInstance = HostInstance +declare type PublicRootInstance = symbol & { + __PublicRootInstance__: string +} +declare interface PublicScrollViewInstance + extends HostInstance, + ScrollViewImperativeMethods {} +declare type PublicTextInstance = ReturnType +declare interface PushNotification { + finish(result: string): void + getAlert(): (Object | undefined) | (string | undefined) + getBadgeCount(): number | undefined + getCategory(): string | undefined + getContentAvailable(): ContentAvailable + getData(): Object | undefined + getMessage(): (Object | undefined) | (string | undefined) + getSound(): string | undefined + getThreadID(): string | undefined +} +declare type PushNotificationEventName = keyof { + localNotification: string + notification: string + register: string + registrationError: string +} +declare class PushNotificationIOS { + static FetchResult: FetchResult + static abandonPermissions(): void + static addEventListener( + type: PushNotificationEventName, + handler: Function, + ): void + static cancelAllLocalNotifications(): void + static cancelLocalNotifications(userInfo: Object): void + static checkPermissions( + callback: (permissions: PushNotificationPermissions) => void, + ): void + constructor(nativeNotif: Object) + finish(fetchResult: string): void + getAlert(): (null | Object | undefined) | (null | string | undefined) + static getApplicationIconBadgeNumber(callback: Function): void + static getAuthorizationStatus( + callback: (authorizationStatus: number) => void, + ): void + getBadgeCount(): null | number | undefined + getCategory(): null | string | undefined + getContentAvailable(): ContentAvailable + getData(): null | Object | undefined + static getDeliveredNotifications( + callback: (notifications: Array) => void, + ): void + static getInitialNotification(): Promise + getMessage(): (null | Object | undefined) | (null | string | undefined) + static getScheduledLocalNotifications(callback: Function): void + getSound(): null | string | undefined + getThreadID(): null | string | undefined + static presentLocalNotification( + details: PresentLocalNotificationDetails, + ): void + static removeAllDeliveredNotifications(): void + static removeDeliveredNotifications(identifiers: Array): void + static removeEventListener(type: PushNotificationEventName): void + static requestPermissions( + permissions?: PushNotificationPermissions, + ): Promise<{ + alert: boolean + badge: boolean + sound: boolean + }> + static scheduleLocalNotification( + details: ScheduleLocalNotificationDetails, + ): void + static setApplicationIconBadgeNumber(number: number): void +} +declare type PushNotificationPermissions = { + [key: string]: boolean | number + alert: boolean + badge: boolean + sound: boolean +} +declare type Rationale = { + buttonNegative?: string + buttonNeutral?: string + buttonPositive?: string + message: string + title: string +} +declare type RCTDeviceEventDefinitions = { + [name: string]: Array +} +declare type RCTNetworkingEventDefinitions = { + readonly didCompleteNetworkResponse: [[number, string, boolean]] + readonly didReceiveNetworkData: [[number, string]] + readonly didReceiveNetworkDataProgress: [[number, number, number]] + readonly didReceiveNetworkIncrementalData: [[number, string, number, number]] + readonly didReceiveNetworkResponse: [ + [ + number, + number, + ( + | undefined + | { + [$$Key$$: string]: string + } + ), + string | undefined, + ], + ] + readonly didSendNetworkData: [[number, number, number]] +} +declare type RCTTextInlineImageNativeProps = Readonly< + ViewProps & { + headers?: { + [$$Key$$: string]: string + } + resizeMode?: ImageResizeMode + src?: ReadonlyArray< + | undefined + | { + readonly uri?: string + } + > + tintColor?: ColorValue + } +> +declare class ReactNativeDocument_default extends ReadOnlyNode_default { + get childElementCount(): number + get children(): HTMLCollection_default + constructor( + rootTag: RootTag, + instanceHandle: ReactNativeDocumentInstanceHandle, + ) + get documentElement(): ReactNativeElement_default + get firstElementChild(): null | ReadOnlyElement_default + get lastElementChild(): null | ReadOnlyElement_default + get nodeName(): string + get nodeType(): number + get nodeValue(): null + get textContent(): null +} +declare type ReactNativeDocumentElementInstanceHandle = symbol & { + __ReactNativeDocumentElementInstanceHandle__: string +} +declare type ReactNativeDocumentInstanceHandle = symbol & { + __ReactNativeDocumentInstanceHandle__: string +} +declare class ReactNativeElement_default + extends ReadOnlyElement_default + implements NativeMethods +{ + blur(): void + constructor( + tag: number, + viewConfig: ViewConfig, + instanceHandle: InstanceHandle, + ownerDocument: ReactNativeDocument_default, + ) + focus(): void + measure(callback: MeasureOnSuccessCallback): void + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void + measureLayout( + relativeToNativeNode: HostInstance | number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail?: () => void, + ): void + get offsetHeight(): number + get offsetLeft(): number + get offsetParent(): null | ReadOnlyElement_default + get offsetTop(): number + get offsetWidth(): number + setNativeProps(nativeProps: {}): void +} +declare class ReadOnlyCharacterData_default extends ReadOnlyNode_default { + get data(): string + get length(): number + get nextElementSibling(): null | ReadOnlyElement_default + get nodeValue(): string + get previousElementSibling(): null | ReadOnlyElement_default + substringData(offset: number, count: number): string + get textContent(): string +} +declare class ReadOnlyElement_default extends ReadOnlyNode_default { + get childElementCount(): number + get children(): HTMLCollection_default + get clientHeight(): number + get clientLeft(): number + get clientTop(): number + get clientWidth(): number + get firstElementChild(): null | ReadOnlyElement_default + getBoundingClientRect(): DOMRect_default + hasPointerCapture(pointerId: number): boolean + get id(): string + get lastElementChild(): null | ReadOnlyElement_default + get nextElementSibling(): null | ReadOnlyElement_default + get nodeName(): string + get nodeType(): number + get nodeValue(): null | string + set nodeValue(value: string) + get previousElementSibling(): null | ReadOnlyElement_default + releasePointerCapture(pointerId: number): void + get scrollHeight(): number + get scrollLeft(): number + get scrollTop(): number + get scrollWidth(): number + setPointerCapture(pointerId: number): void + get tagName(): string + get textContent(): string +} +declare class ReadOnlyNode_default { + static ATTRIBUTE_NODE: number + static CDATA_SECTION_NODE: number + static COMMENT_NODE: number + static DOCUMENT_FRAGMENT_NODE: number + static DOCUMENT_NODE: number + static DOCUMENT_POSITION_CONTAINED_BY: number + static DOCUMENT_POSITION_CONTAINS: number + static DOCUMENT_POSITION_DISCONNECTED: number + static DOCUMENT_POSITION_FOLLOWING: number + static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number + static DOCUMENT_POSITION_PRECEDING: number + static DOCUMENT_TYPE_NODE: number + static ELEMENT_NODE: number + static ENTITY_NODE: number + static ENTITY_REFERENCE_NODE: number + static NOTATION_NODE: number + static PROCESSING_INSTRUCTION_NODE: number + static TEXT_NODE: number + get childNodes(): NodeList_default + compareDocumentPosition(otherNode: ReadOnlyNode_default): number + constructor( + instanceHandle: InstanceHandle, + ownerDocument: null | ReactNativeDocument_default, + ) + contains(otherNode: ReadOnlyNode_default): boolean + get firstChild(): null | ReadOnlyNode_default + getRootNode(): ReadOnlyNode_default + hasChildNodes(): boolean + get isConnected(): boolean + get lastChild(): null | ReadOnlyNode_default + get nextSibling(): null | ReadOnlyNode_default + get nodeName(): string + get nodeType(): number + get nodeValue(): null | string + get ownerDocument(): null | ReactNativeDocument_default + get parentElement(): null | ReadOnlyElement_default + get parentNode(): null | ReadOnlyNode_default + get previousSibling(): null | ReadOnlyNode_default + get textContent(): string +} +declare class ReadOnlyText_default extends ReadOnlyCharacterData_default { + get nodeName(): string + get nodeType(): number +} +declare type Rect = { + readonly bottom?: number + readonly left?: number + readonly right?: number + readonly top?: number +} +declare type RectOrSize = number | Rect +declare class RefreshControl extends React.Component { + componentDidMount(): void + componentDidUpdate(prevProps: RefreshControlProps): void + render(): React.ReactNode +} +declare type RefreshControlBaseProps = { + readonly onRefresh?: () => Promise | void + readonly progressViewOffset?: number + readonly refreshing: boolean +} +declare type RefreshControlProps = Readonly< + ViewProps & + RefreshControlPropsIOS & + RefreshControlPropsAndroid & + RefreshControlBaseProps +> +declare type RefreshControlPropsAndroid = { + readonly colors?: ReadonlyArray + readonly enabled?: boolean + readonly progressBackgroundColor?: ColorValue + readonly size?: "default" | "large" +} +declare type RefreshControlPropsIOS = { + readonly tintColor?: ColorValue + readonly title?: string + readonly titleColor?: ColorValue +} +declare type registerCallableModule = typeof registerCallableModule +declare type RegisterCallableModule = ( + name: string, + moduleOrFactory: (($$PARAM_0$$: void) => Module) | Module, +) => void +declare function registerCancellableHeadlessTask( + taskKey: string, + taskProvider: TaskProvider, + taskCancelProvider: TaskCancelProvider, +): void +declare function registerComponent( + appKey: string, + componentProvider: ComponentProvider, + section?: boolean, +): string +declare function registerConfig(config: Array): void +declare function registerHeadlessTask( + taskKey: string, + taskProvider: TaskProvider, +): void +declare function registerRunnable(appKey: string, run: Runnable): string +declare function registerSection( + appKey: string, + component: ComponentProvider, +): void +declare type Registry = { + runnables: Runnables + sections: ReadonlyArray +} +declare type RequestBody = + | ArrayBuffer + | ArrayBufferView + | Blob_default + | FormData_default + | string + | { + uri: string + } +declare type RequiredFlatListProps = { + data: Readonly> | undefined +} +declare type RequiredSectionListProps = { + sections: ReadonlyArray> +} +declare type RequiredVirtualizedListProps = { + data?: any + getItem: (data: any, index: number) => Item | undefined + getItemCount: (data: any) => number +} +declare type RequiredVirtualizedSectionListProps< + ItemT, + SectionT = DefaultVirtualizedSectionT, +> = { + sections: ReadonlyArray> +} +declare type requireNativeComponent = typeof requireNativeComponent +declare type ResolvedAssetSource = { + readonly height: number | undefined + readonly scale: number + readonly uri: string + readonly width: number | undefined +} +declare type ResponderSyntheticEvent = Readonly< + NativeSyntheticEvent & { + touchHistory: { + readonly indexOfSingleActiveTouch: number + readonly mostRecentTimeStamp: number + readonly numberActiveTouches: number + readonly touchBank: ReadonlyArray<{ + readonly currentPageX: number + readonly currentPageY: number + readonly currentTimeStamp: number + readonly previousPageX: number + readonly previousPageY: number + readonly previousTimeStamp: number + readonly startPageX: number + readonly startPageY: number + readonly startTimeStamp: number + readonly touchActive: boolean + }> + } + } +> +declare type ReturnKeyType = "done" | "go" | "next" | "search" | "send" +declare type ReturnKeyTypeAndroid = "none" | "previous" +declare type ReturnKeyTypeIOS = + | "default" + | "emergency-call" + | "google" + | "join" + | "route" + | "yahoo" +declare type ReturnKeyTypeOptions = + | ReturnKeyType + | ReturnKeyTypeAndroid + | ReturnKeyTypeIOS +declare type RgbaAnimatedValue = { + readonly a: AnimatedValue_default + readonly b: AnimatedValue_default + readonly g: AnimatedValue_default + readonly r: AnimatedValue_default +} +declare type RgbaValue = { + readonly a: number + readonly b: number + readonly g: number + readonly r: number +} +declare type Role = + | "alert" + | "alertdialog" + | "application" + | "article" + | "banner" + | "button" + | "cell" + | "checkbox" + | "columnheader" + | "combobox" + | "complementary" + | "contentinfo" + | "definition" + | "dialog" + | "directory" + | "document" + | "feed" + | "figure" + | "form" + | "grid" + | "group" + | "heading" + | "img" + | "link" + | "list" + | "listitem" + | "log" + | "main" + | "marquee" + | "math" + | "menu" + | "menubar" + | "menuitem" + | "meter" + | "navigation" + | "none" + | "note" + | "option" + | "presentation" + | "progressbar" + | "radio" + | "radiogroup" + | "region" + | "row" + | "rowgroup" + | "rowheader" + | "scrollbar" + | "searchbox" + | "separator" + | "slider" + | "spinbutton" + | "status" + | "summary" + | "switch" + | "tab" + | "table" + | "tablist" + | "tabpanel" + | "term" + | "timer" + | "toolbar" + | "tooltip" + | "tree" + | "treegrid" + | "treeitem" +declare type RootTag = symbol & { + __RootTag__: string +} +declare type RootTagContext = typeof RootTagContext +declare type RootViewStyleProvider = (appParameters: Object) => ViewStyleProp +declare function runApplication( + appKey: string, + appParameters: AppParameters, + displayMode?: number, +): void +declare type Runnable = ( + appParameters: AppParameters, + displayMode: DisplayModeType, +) => void +declare type Runnables = { + [appKey: string]: Runnable +} +declare type SafeAreaView = typeof SafeAreaView +declare type ScaledSize = DisplayMetrics +declare type ScheduleLocalNotificationDetails = + PresentLocalNotificationDetails & { + repeatInterval?: "day" | "hour" | "minute" | "month" | "week" | "year" + } +declare type ScrollEvent = NativeSyntheticEvent +declare type ScrollResponderType = ScrollViewImperativeMethods +declare type ScrollToLocationParamsType = { + animated?: boolean + itemIndex: number + sectionIndex: number + viewOffset?: number + viewPosition?: number +} +declare type ScrollView = typeof ScrollView +declare type ScrollViewBaseProps = { + readonly children?: React.ReactNode + readonly contentContainerStyle?: ViewStyleProp + readonly contentOffset?: PointProp + readonly decelerationRate?: DecelerationRateType + readonly disableIntervalMomentum?: boolean + readonly horizontal?: boolean + readonly innerViewRef?: React.Ref + readonly invertStickyHeaders?: boolean + readonly keyboardDismissMode?: "interactive" | "none" | "on-drag" + readonly keyboardShouldPersistTaps?: + | "always" + | "handled" + | "never" + | false + | true + readonly maintainVisibleContentPosition?: { + readonly autoscrollToTopThreshold?: number + readonly minIndexForVisible: number + } + readonly onMomentumScrollBegin?: (event: ScrollEvent) => void + readonly onMomentumScrollEnd?: (event: ScrollEvent) => void + readonly onScroll?: (event: ScrollEvent) => void + readonly onScrollBeginDrag?: (event: ScrollEvent) => void + readonly onScrollEndDrag?: (event: ScrollEvent) => void + readonly pagingEnabled?: boolean + readonly refreshControl?: React.JSX.Element + readonly removeClippedSubviews?: boolean + readonly scrollEnabled?: boolean + readonly scrollEventThrottle?: number + readonly scrollViewRef?: React.Ref + readonly showsVerticalScrollIndicator?: boolean + readonly snapToAlignment?: "center" | "end" | "start" + readonly snapToEnd?: boolean + readonly snapToInterval?: number + readonly snapToOffsets?: ReadonlyArray + readonly snapToStart?: boolean + readonly StickyHeaderComponent?: StickyHeaderComponentType + readonly stickyHeaderHiddenOnScroll?: boolean + readonly stickyHeaderIndices?: ReadonlyArray + readonly onContentSizeChange?: ( + contentWidth: number, + contentHeight: number, + ) => void + readonly onKeyboardDidHide?: (event: KeyboardEvent) => void + readonly onKeyboardDidShow?: (event: KeyboardEvent) => void + readonly onKeyboardWillHide?: (event: KeyboardEvent) => void + readonly onKeyboardWillShow?: (event: KeyboardEvent) => void +} +declare type ScrollViewComponentStatics = { + readonly Context: typeof $$ScrollViewContext +} +declare interface ScrollViewImperativeMethods { + readonly flashScrollIndicators: () => void + readonly getInnerViewNode: () => number | undefined + readonly getInnerViewRef: () => InnerViewInstance | null + readonly getNativeScrollRef: () => HostInstance | null + readonly getScrollableNode: () => number | undefined + readonly getScrollResponder: () => ScrollResponderType + readonly scrollResponderScrollNativeHandleToKeyboard: ( + nodeHandle: HostInstance | number, + additionalOffset?: number, + preventNegativeScrollOffset?: boolean, + ) => void + readonly scrollResponderZoomTo: ( + rect: { + animated?: boolean + height: number + width: number + x: number + y: number + }, + animated?: boolean, + ) => void + readonly scrollTo: ( + options?: number | ScrollViewScrollToOptions, + deprecatedX?: number, + deprecatedAnimated?: boolean, + ) => void + readonly scrollToEnd: ( + options?: ScrollViewScrollToOptions | undefined, + ) => void +} +declare type ScrollViewNativeComponent = typeof $$ScrollViewNativeComponent +declare type ScrollViewNativeProps = Readonly< + Omit & { + alwaysBounceHorizontal?: boolean + alwaysBounceVertical?: boolean + automaticallyAdjustContentInsets?: boolean + automaticallyAdjustKeyboardInsets?: boolean + automaticallyAdjustsScrollIndicatorInsets?: boolean + bounces?: boolean + bouncesZoom?: boolean + canCancelContentTouches?: boolean + centerContent?: boolean + contentInset?: EdgeInsetsProp + contentInsetAdjustmentBehavior?: + | "always" + | "automatic" + | "never" + | "scrollableAxes" + contentOffset?: PointProp + decelerationRate?: "fast" | "normal" | number + directionalLockEnabled?: boolean + disableIntervalMomentum?: boolean + endFillColor?: ColorValue + fadingEdgeLength?: + | (number | undefined) + | { + end: number + start: number + } + indicatorStyle?: "black" | "default" | "white" + isInvertedVirtualizedList?: boolean + keyboardDismissMode?: "interactive" | "none" | "on-drag" + maintainVisibleContentPosition?: { + readonly autoscrollToTopThreshold?: number + readonly minIndexForVisible: number + } + maximumZoomScale?: number + minimumZoomScale?: number + nestedScrollEnabled?: boolean + onMomentumScrollBegin?: (event: ScrollEvent) => void + onMomentumScrollEnd?: (event: ScrollEvent) => void + onResponderGrant?: (e: GestureResponderEvent) => boolean | void + onScroll?: (event: ScrollEvent) => void + onScrollBeginDrag?: (event: ScrollEvent) => void + onScrollEndDrag?: (event: ScrollEvent) => void + overScrollMode?: "always" | "auto" | "never" + pagingEnabled?: boolean + persistentScrollbar?: boolean + pinchGestureEnabled?: boolean + scrollEnabled?: boolean + scrollEventThrottle?: number + scrollIndicatorInsets?: EdgeInsetsProp + scrollPerfTag?: string + scrollsToTop?: boolean + scrollToOverflowEnabled?: boolean + sendMomentumEvents?: boolean + showsHorizontalScrollIndicator?: boolean + showsVerticalScrollIndicator?: boolean + snapToAlignment?: "center" | "end" | "start" + snapToEnd?: boolean + snapToInterval?: number + snapToOffsets?: ReadonlyArray + snapToStart?: boolean + zoomScale?: number + onScrollToTop?: (event: ScrollEvent) => void + } +> +declare type ScrollViewProps = Readonly< + ViewProps & ScrollViewPropsIOS & ScrollViewPropsAndroid & ScrollViewBaseProps +> +declare type ScrollViewPropsAndroid = { + readonly endFillColor?: ColorValue + readonly fadingEdgeLength?: + | (number | undefined) + | { + end: number + start: number + } + readonly nestedScrollEnabled?: boolean + readonly overScrollMode?: "always" | "auto" | "never" + readonly persistentScrollbar?: boolean + readonly scrollPerfTag?: string +} +declare type ScrollViewPropsIOS = { + readonly alwaysBounceHorizontal?: boolean + readonly alwaysBounceVertical?: boolean + readonly automaticallyAdjustContentInsets?: boolean + readonly automaticallyAdjustKeyboardInsets?: boolean + readonly automaticallyAdjustsScrollIndicatorInsets?: boolean + readonly bounces?: boolean + readonly bouncesZoom?: boolean + readonly canCancelContentTouches?: boolean + readonly centerContent?: boolean + readonly contentInset?: EdgeInsetsProp + readonly contentInsetAdjustmentBehavior?: + | "always" + | "automatic" + | "never" + | "scrollableAxes" + readonly directionalLockEnabled?: boolean + readonly disableScrollViewPanResponder?: boolean + readonly indicatorStyle?: "black" | "default" | "white" + readonly maximumZoomScale?: number + readonly minimumZoomScale?: number + readonly pinchGestureEnabled?: boolean + readonly scrollIndicatorInsets?: EdgeInsetsProp + readonly scrollsToTop?: boolean + readonly scrollToOverflowEnabled?: boolean + readonly showsHorizontalScrollIndicator?: boolean + readonly zoomScale?: number + readonly onScrollToTop?: (event: ScrollEvent) => void +} +declare interface ScrollViewScrollToOptions { + animated?: boolean + x?: number + y?: number +} +declare type ScrollViewStickyHeaderProps = { + readonly children?: React.ReactNode + readonly hiddenOnScroll?: boolean + readonly inverted: boolean | undefined + readonly nativeID?: string + readonly nextHeaderLayoutY: number | undefined + readonly scrollAnimatedValue: Animated.Value + readonly scrollViewHeight: number | undefined + readonly onLayout: (event: LayoutChangeEvent) => void +} +declare type SectionBase< + SectionItemT, + SectionT = DefaultVirtualizedSectionT, +> = { + data: ReadonlyArray + ItemSeparatorComponent?: React.ComponentType + key?: string + renderItem?: (info: { + index: number + item: SectionItemT + section: SectionListData + separators: { + highlight: () => void + unhighlight: () => void + updateProps: (select: "leading" | "trailing", newProps: Object) => void + } + }) => null | React.JSX.Element + keyExtractor?: ( + item: SectionItemT | undefined, + index?: number | undefined, + ) => string +} +declare class SectionList< + ItemT = any, + SectionT = DefaultSectionT, +> extends React.PureComponent> { + props: SectionListProps + flashScrollIndicators(): void + getScrollableNode(): any + getScrollResponder(): null | ScrollResponderType | undefined + recordInteraction(): void + render(): React.ReactNode + scrollToLocation(params: ScrollToLocationParamsType): void + setNativeProps(props: Object): void +} +declare type SectionListData< + SectionItemT, + SectionT = DefaultVirtualizedSectionT, +> = + | (Readonly> & SectionT) + | (SectionBase & SectionT) + | SectionT +declare type SectionListProps = Omit< + Omit< + VirtualizedSectionListProps, + "getItem" | "getItemCount" | "keyExtractor" | "renderItem" + >, + | "extraData" + | "initialNumToRender" + | "inverted" + | "keyExtractor" + | "onEndReached" + | "removeClippedSubviews" + | "renderItem" + | "sections" + | never +> & + RequiredSectionListProps & + OptionalSectionListProps +declare type SectionListRenderItem = ( + info: SectionListRenderItemInfo, +) => null | React.ReactNode +declare type SectionListRenderItemInfo< + ItemT, + SectionT = DefaultSectionT, +> = ListRenderItemInfo & { + section: SectionListData +} +declare type Selection = { + readonly end: number + readonly start: number +} +declare type Separators = { + highlight: () => void + unhighlight: () => void + updateProps: (select: "leading" | "trailing", newProps: Object) => void +} +declare type sequence = typeof sequence +declare function setColorScheme( + colorScheme: ColorSchemeName | null | undefined, +): void +declare function setComponentProviderInstrumentationHook( + hook: ComponentProviderInstrumentationHook, +): void +declare function setEnabled(_doEnable: boolean): void +declare function setLayoutAnimationEnabled(value: boolean): void +declare function setRootViewStyleProvider(provider: RootViewStyleProvider): void +declare type setStyleAttributePreprocessor = + typeof setStyleAttributePreprocessor +declare function setSurfaceProps( + appKey: string, + appParameters: Object, + displayMode?: number, +): void +declare type Settings = typeof Settings +declare function setWrapperComponentProvider( + provider: WrapperComponentProvider, +): void +declare class Share { + static dismissedAction: "dismissedAction" + static sharedAction: "sharedAction" + static share( + content: ShareContent, + options?: ShareOptions, + ): Promise<{ + action: string + activityType: string | undefined + }> +} +declare type ShareAction = { + action: "dismissedAction" | "sharedAction" + activityType?: null | string +} +declare type ShareActionSheetError = { + readonly code: string + readonly domain: string + readonly message: string + readonly userInfo?: Object +} +declare type ShareActionSheetIOSOptions = { + readonly anchor?: number + readonly cancelButtonTintColor?: number + readonly disabledButtonTintColor?: number + readonly excludedActivityTypes?: Array + readonly message?: string + readonly subject?: string + readonly tintColor?: number + readonly url?: string + readonly userInterfaceStyle?: string +} +declare type ShareContent = + | { + message: string + title?: string + url?: string + } + | { + message?: string + title?: string + url: string + } +declare type ShareOptions = { + anchor?: number + dialogTitle?: string + excludedActivityTypes?: Array + subject?: string + tintColor?: ColorValue +} +declare type SimpleTask = { + name: string + run: () => void +} +declare interface Spec extends TurboModule { + readonly getConstants: () => { + readonly buttonClicked: DialogAction + readonly buttonNegative: DialogButtonKey + readonly buttonNeutral: DialogButtonKey + readonly buttonPositive: DialogButtonKey + readonly dismissed: DialogAction + } + readonly showAlert: ( + config: DialogOptions, + onError: (error: string) => void, + onAction: (action: DialogAction, buttonKey?: DialogButtonKey) => void, + ) => void +} +declare interface Spec_2 extends TurboModule { + readonly blur?: (reactTag: number) => void + readonly clearJSResponder: () => void + readonly configureNextLayoutAnimation: ( + config: Object, + callback: () => void, + errorCallback: (error: Object) => void, + ) => void + readonly createView: ( + reactTag: number, + viewName: string, + rootTag: RootTag, + props: Object, + ) => void + readonly dispatchViewManagerCommand: ( + reactTag: number, + commandID: number, + commandArgs?: Array, + ) => void + readonly findSubviewIn: ( + reactTag: number, + point: Array, + callback: ( + nativeViewTag: number, + left: number, + top: number, + width: number, + height: number, + ) => void, + ) => void + readonly focus?: (reactTag: number) => void + readonly getConstants: () => Object + readonly getConstantsForViewManager?: ( + viewManagerName: string, + ) => Object | undefined + readonly getDefaultEventTypes?: () => Array + readonly lazilyLoadView?: (name: string) => Object + readonly manageChildren: ( + containerTag: number, + moveFromIndices: Array, + moveToIndices: Array, + addChildReactTags: Array, + addAtIndices: Array, + removeAtIndices: Array, + ) => void + readonly measure: ( + reactTag: number, + callback: NativeMeasureOnSuccessCallback, + ) => void + readonly measureInWindow: ( + reactTag: number, + callback: NativeMeasureInWindowOnSuccessCallback, + ) => void + readonly measureLayout: ( + reactTag: number, + ancestorReactTag: number, + errorCallback: (error: Object) => void, + callback: NativeMeasureLayoutOnSuccessCallback, + ) => void + readonly measureLayoutRelativeToParent: ( + reactTag: number, + errorCallback: (error: Object) => void, + callback: ( + left: number, + top: number, + width: number, + height: number, + ) => void, + ) => void + readonly sendAccessibilityEvent?: ( + reactTag: number, + eventType: number, + ) => void + readonly setChildren: (containerTag: number, reactTags: Array) => void + readonly setJSResponder: ( + reactTag: number, + blockNativeResponder: boolean, + ) => void + readonly setLayoutAnimationEnabledExperimental?: (enabled: boolean) => void + readonly updateView: ( + reactTag: number, + viewName: string, + props: Object, + ) => void + readonly viewIsDescendantOf: ( + reactTag: number, + ancestorReactTag: number, + callback: (result: Array) => void, + ) => void +} +declare type spring = typeof spring +declare type SpringAnimationConfig = Readonly< + AnimationConfig & { + bounciness?: number + damping?: number + delay?: number + friction?: number + mass?: number + overshootClamping?: boolean + restDisplacementThreshold?: number + restSpeedThreshold?: number + speed?: number + stiffness?: number + tension?: number + toValue: + | AnimatedColor_default + | AnimatedInterpolation_default + | AnimatedValue_default + | AnimatedValueXY_default + | number + | { + a: number + b: number + g: number + r: number + } + | { + x: number + y: number + } + velocity?: + | number + | { + readonly x: number + readonly y: number + } + } +> +declare type StackFrame = { + collapse?: boolean + column: number | undefined + file: string | undefined + lineNumber: number | undefined + methodName: string +} +declare type StackProps = { + backgroundColor: + | undefined + | { + animated: boolean + value: StatusBarProps["backgroundColor"] + } + barStyle: + | undefined + | { + animated: boolean + value: StatusBarProps["barStyle"] + } + hidden: + | undefined + | { + animated: boolean + transition: StatusBarProps["showHideTransition"] + value: boolean + } + networkActivityIndicatorVisible: StatusBarProps["networkActivityIndicatorVisible"] + translucent: StatusBarProps["translucent"] +} +declare type stagger = typeof stagger +declare function startHeadlessTask( + taskId: number, + taskKey: string, + data: any, +): void +declare type State = { + cellsAroundViewport: { + first: number + last: number + } + firstVisibleItemKey: string | undefined + pendingScrollUpdateCount: number + renderMask: CellRenderMask +} +declare class StateSafePureComponent_default< + Props, + State extends {}, +> extends React.PureComponent { + constructor(props: Props) + setState( + partialState: + | ( + | (( + $$PARAM_0$$: State, + $$PARAM_1$$: Props, + ) => null | Pick | undefined) + | Pick + ) + | null + | undefined, + callback?: () => unknown, + ): void +} +declare class StatusBar extends React.Component { + static currentHeight: null | number | undefined + componentDidMount(): void + componentDidUpdate(): void + componentWillUnmount(): void + static popStackEntry(entry: StackProps): void + static pushStackEntry(props: StatusBarProps): StackProps + render(): React.ReactNode + static replaceStackEntry(entry: StackProps, props: StatusBarProps): StackProps + static setBackgroundColor(color: ColorValue, animated?: boolean): void + static setBarStyle(style: StatusBarStyle, animated?: boolean): void + static setHidden(hidden: boolean, animation?: StatusBarAnimation): void + static setNetworkActivityIndicatorVisible(visible: boolean): void + static setTranslucent(translucent: boolean): void +} +declare type StatusBarAnimation = keyof { + fade: string + none: string + slide: string +} +declare type StatusBarBaseProps = { + readonly animated?: boolean + readonly barStyle?: "dark-content" | "default" | "light-content" + readonly hidden?: boolean +} +declare type StatusBarProps = Readonly< + StatusBarPropsAndroid & StatusBarPropsIOS & StatusBarBaseProps +> +declare type StatusBarPropsAndroid = { + readonly backgroundColor?: ColorValue + readonly translucent?: boolean +} +declare type StatusBarPropsIOS = { + readonly networkActivityIndicatorVisible?: boolean + readonly showHideTransition?: "fade" | "none" | "slide" +} +declare type StatusBarStyle = keyof { + "dark-content": string + default: string + "light-content": string +} +declare type StickyHeaderComponentType = ( + props: ScrollViewStickyHeaderProps & { + ref?: React.Ref<{ + readonly setNextHeaderY: ($$PARAM_0$$: number) => void + }> + }, +) => React.ReactNode +declare type StyleProp = + | "" + | false + | null + | ReadonlyArray> + | T + | void +declare namespace StyleSheet { + export { + hairlineWidth, + absoluteFill, + absoluteFillObject, + compose, + flatten, + setStyleAttributePreprocessor, + create, + } +} +declare type SubmitBehavior = "blurAndSubmit" | "newline" | "submit" +declare type subtract = typeof subtract +declare type Switch = typeof Switch +declare type SwitchChangeEvent = NativeSyntheticEvent +declare type SwitchChangeEventData = { + readonly target: number + readonly value: boolean +} +declare type SwitchNativeProps = Readonly< + ViewProps & { + disabled?: WithDefault + onChange?: BubblingEventHandler + onTintColor?: ColorValue + thumbColor?: ColorValue + thumbTintColor?: ColorValue + tintColor?: ColorValue + trackColorForFalse?: ColorValue + trackColorForTrue?: ColorValue + value?: WithDefault + } +> +declare type SwitchProps = Readonly< + ViewProps & SwitchPropsIOS & SwitchPropsBase +> +declare type SwitchPropsBase = { + disabled?: boolean + ios_backgroundColor?: ColorValue + onChange?: (event: SwitchChangeEvent) => Promise | void + onValueChange?: (value: boolean) => Promise | void + thumbColor?: ColorValue + trackColor?: { + readonly false?: ColorValue + readonly true?: ColorValue + } + value?: boolean +} +declare type SwitchPropsIOS = { + onTintColor?: ColorValue + thumbTintColor?: ColorValue + tintColor?: ColorValue +} +declare type SwitchRef = React.ComponentRef< + typeof $$AndroidSwitchNativeComponent | typeof $$SwitchNativeComponent +> +declare namespace Systrace { + export { + isEnabled, + setEnabled, + beginEvent, + endEvent, + beginAsyncEvent, + endAsyncEvent, + counterEvent, + EventName, + EventArgs, + } +} +declare type TargetedEvent = { + readonly target: number +} +declare type TargetEvent = { + readonly target: number +} +declare type Task = (() => void) | PromiseTask | SimpleTask +declare type TaskCanceller = () => void +declare type TaskCancelProvider = () => TaskCanceller +declare type TaskProvider = () => HeadlessTask +declare type TBackHandler = { + addEventListener( + eventName: BackPressEventName, + handler: () => boolean | undefined, + ): { + remove: () => void + } + exitApp(): void +} +declare type Text = typeof Text +declare type TextBaseProps = { + readonly allowFontScaling?: boolean + readonly android_hyphenationFrequency?: "full" | "none" | "normal" + readonly children?: React.ReactNode + readonly ellipsizeMode?: "clip" | "head" | "middle" | "tail" + readonly id?: string + readonly maxFontSizeMultiplier?: number + readonly nativeID?: string + readonly numberOfLines?: number + readonly onAccessibilityAction?: (event: AccessibilityActionEvent) => unknown + readonly onLayout?: (event: LayoutChangeEvent) => unknown + readonly onLongPress?: (event: GestureResponderEvent) => unknown + readonly onMoveShouldSetResponder?: () => boolean + readonly onPress?: (event: GestureResponderEvent) => unknown + readonly onPressIn?: (event: GestureResponderEvent) => unknown + readonly onPressOut?: (event: GestureResponderEvent) => unknown + readonly onResponderGrant?: (event: GestureResponderEvent) => void + readonly onResponderMove?: (event: GestureResponderEvent) => void + readonly onResponderRelease?: (event: GestureResponderEvent) => void + readonly onResponderTerminate?: (event: GestureResponderEvent) => void + readonly onResponderTerminationRequest?: () => boolean + readonly onStartShouldSetResponder?: () => boolean + readonly onTextLayout?: (event: TextLayoutEvent) => unknown + readonly pressRetentionOffset?: PressRetentionOffset + readonly role?: Role + readonly selectable?: boolean + readonly style?: TextStyleProp + readonly testID?: string +} +declare type TextContentType = + | "addressCity" + | "addressCityAndState" + | "addressState" + | "birthdate" + | "birthdateDay" + | "birthdateMonth" + | "birthdateYear" + | "cellularEID" + | "cellularIMEI" + | "countryName" + | "creditCardExpiration" + | "creditCardExpirationMonth" + | "creditCardExpirationYear" + | "creditCardFamilyName" + | "creditCardGivenName" + | "creditCardMiddleName" + | "creditCardName" + | "creditCardNumber" + | "creditCardSecurityCode" + | "creditCardType" + | "dateTime" + | "emailAddress" + | "familyName" + | "flightNumber" + | "fullStreetAddress" + | "givenName" + | "jobTitle" + | "location" + | "middleName" + | "name" + | "namePrefix" + | "nameSuffix" + | "newPassword" + | "nickname" + | "none" + | "oneTimeCode" + | "organizationName" + | "password" + | "postalCode" + | "shipmentTrackingNumber" + | "streetAddressLine1" + | "streetAddressLine2" + | "sublocality" + | "telephoneNumber" + | "URL" + | "username" +declare type TextForwardRef = React.ComponentRef< + typeof NativeText | typeof NativeVirtualText +> +declare type TextInlineImageNativeComponent = + typeof $$TextInlineImageNativeComponent +declare type TextInput = typeof TextInput +declare type TextInputAndroidProps = { + readonly cursorColor?: ColorValue + readonly disableFullscreenUI?: boolean + readonly importantForAutofill?: + | "auto" + | "no" + | "noExcludeDescendants" + | "yes" + | "yesExcludeDescendants" + readonly inlineImageLeft?: string + readonly inlineImagePadding?: number + readonly numberOfLines?: number + readonly returnKeyLabel?: string + readonly rows?: number + readonly selectionHandleColor?: ColorValue + readonly showSoftInputOnFocus?: boolean + readonly textBreakStrategy?: "balanced" | "highQuality" | "simple" + readonly underlineColorAndroid?: ColorValue +} +declare type TextInputBaseProps = { + readonly allowFontScaling?: boolean + readonly autoCapitalize?: AutoCapitalize + readonly autoComplete?: + | "additional-name" + | "address-line1" + | "address-line2" + | "birthdate-day" + | "birthdate-full" + | "birthdate-month" + | "birthdate-year" + | "cc-csc" + | "cc-exp-day" + | "cc-exp-month" + | "cc-exp-year" + | "cc-exp" + | "cc-family-name" + | "cc-given-name" + | "cc-middle-name" + | "cc-name" + | "cc-number" + | "cc-type" + | "country" + | "current-password" + | "email" + | "family-name" + | "gender" + | "given-name" + | "honorific-prefix" + | "honorific-suffix" + | "name-family" + | "name-given" + | "name-middle-initial" + | "name-middle" + | "name-prefix" + | "name-suffix" + | "name" + | "new-password" + | "nickname" + | "off" + | "one-time-code" + | "organization-title" + | "organization" + | "password-new" + | "password" + | "postal-address-country" + | "postal-address-extended-postal-code" + | "postal-address-extended" + | "postal-address-locality" + | "postal-address-region" + | "postal-address" + | "postal-code" + | "sms-otp" + | "street-address" + | "tel-country-code" + | "tel-device" + | "tel-national" + | "tel" + | "url" + | "username-new" + | "username" + readonly autoCorrect?: boolean + readonly autoFocus?: boolean + readonly blurOnSubmit?: boolean + readonly caretHidden?: boolean + readonly contextMenuHidden?: boolean + readonly defaultValue?: string + readonly editable?: boolean + readonly enterKeyHint?: EnterKeyHintTypeOptions + readonly forwardedRef?: React.Ref + readonly inputMode?: InputModeOptions + readonly keyboardType?: KeyboardTypeOptions + readonly maxFontSizeMultiplier?: number + readonly maxLength?: number + readonly multiline?: boolean + readonly onBlur?: (e: TextInputBlurEvent) => unknown + readonly onChange?: (e: TextInputChangeEvent) => unknown + readonly onChangeText?: (text: string) => unknown + readonly onContentSizeChange?: (e: TextInputContentSizeChangeEvent) => unknown + readonly onEndEditing?: (e: TextInputEndEditingEvent) => unknown + readonly onFocus?: (e: TextInputFocusEvent) => unknown + readonly onKeyPress?: (e: TextInputKeyPressEvent) => unknown + readonly onPress?: (event: GestureResponderEvent) => unknown + readonly onPressIn?: (event: GestureResponderEvent) => unknown + readonly onPressOut?: (event: GestureResponderEvent) => unknown + readonly onScroll?: (e: ScrollEvent) => unknown + readonly onSelectionChange?: (e: TextInputSelectionChangeEvent) => unknown + readonly onSubmitEditing?: (e: TextInputSubmitEditingEvent) => unknown + readonly placeholder?: string + readonly placeholderTextColor?: ColorValue + readonly readOnly?: boolean + readonly returnKeyType?: ReturnKeyTypeOptions + readonly secureTextEntry?: boolean + readonly selection?: { + readonly end?: number + readonly start: number + } + readonly selectionColor?: ColorValue + readonly selectTextOnFocus?: boolean + readonly style?: TextStyleProp + readonly submitBehavior?: SubmitBehavior + readonly textAlign?: "center" | "left" | "right" + readonly value?: string +} +declare type TextInputBlurEvent = BlurEvent +declare type TextInputChangeEvent = + NativeSyntheticEvent +declare type TextInputChangeEventData = { + readonly eventCount: number + readonly target: number + readonly text: string +} +declare type TextInputComponentStatics = { + readonly State: { + readonly blurTextInput: (textField: HostInstance | undefined) => void + readonly currentlyFocusedField: () => number | undefined + readonly currentlyFocusedInput: () => HostInstance | undefined + readonly focusTextInput: (textField: HostInstance | undefined) => void + } +} +declare type TextInputContentSizeChangeEvent = + NativeSyntheticEvent +declare type TextInputContentSizeChangeEventData = { + readonly contentSize: { + readonly height: number + readonly width: number + } + readonly target: number +} +declare type TextInputEndEditingEvent = + NativeSyntheticEvent +declare type TextInputEndEditingEventData = Readonly< + TargetEvent & { + eventCount: number + text: string + } +> +declare type TextInputFocusEvent = FocusEvent +declare interface TextInputInstance extends HostInstance { + readonly clear: () => void + readonly getNativeRef: () => HostInstance | undefined + readonly isFocused: () => boolean + readonly setSelection: (start: number, end: number) => void +} +declare type TextInputIOSProps = { + readonly clearButtonMode?: + | "always" + | "never" + | "unless-editing" + | "while-editing" + readonly clearTextOnFocus?: boolean + readonly dataDetectorTypes?: + | (DataDetectorTypesType | undefined) + | ReadonlyArray + readonly disableKeyboardShortcuts?: boolean + readonly enablesReturnKeyAutomatically?: boolean + readonly inputAccessoryViewButtonLabel?: string + readonly inputAccessoryViewID?: string + readonly keyboardAppearance?: "dark" | "default" | "light" + readonly lineBreakModeIOS?: + | "char" + | "clip" + | "head" + | "middle" + | "tail" + | "wordWrapping" + readonly lineBreakStrategyIOS?: + | "hangul-word" + | "none" + | "push-out" + | "standard" + readonly passwordRules?: PasswordRules + readonly rejectResponderTermination?: boolean + readonly scrollEnabled?: boolean + readonly smartInsertDelete?: boolean + readonly spellCheck?: boolean + readonly textContentType?: TextContentType +} +declare type TextInputKeyPressEvent = + NativeSyntheticEvent +declare type TextInputKeyPressEventData = Readonly< + Omit & { + eventCount: number + key: string + target?: number + } +> +declare type TextInputProps = Readonly< + Omit & + TextInputIOSProps & + TextInputAndroidProps & + TextInputBaseProps +> +declare type TextInputSelectionChangeEvent = + NativeSyntheticEvent +declare type TextInputSelectionChangeEventData = Readonly< + TargetEvent & { + selection: Selection + } +> +declare type TextInputSubmitEditingEvent = + NativeSyntheticEvent +declare type TextInputSubmitEditingEventData = Readonly< + TargetEvent & { + eventCount: number + text: string + } +> +declare type TextInputType = InternalTextInput & TextInputComponentStatics +declare type TextLayoutEvent = NativeSyntheticEvent +declare type TextLayoutEventData = { + readonly lines: Array +} +declare type TextLayoutLine = Readonly< + LayoutRectangle & { + ascender: number + capHeight: number + descender: number + text: string + xHeight: number + } +> +declare type TextPointerEventProps = { + readonly onPointerEnter?: (event: PointerEvent) => void + readonly onPointerLeave?: (event: PointerEvent) => void + readonly onPointerMove?: (event: PointerEvent) => void +} +declare type TextProps = Readonly< + TextPointerEventProps & + TextPropsIOS & + TextPropsAndroid & + TextBaseProps & + AccessibilityProps +> +declare type TextPropsAndroid = { + adjustsFontSizeToFit?: boolean + dataDetectorType?: "all" | "email" | "link" | "none" | "phoneNumber" + disabled?: boolean + minimumFontScale?: number + selectionColor?: ColorValue + textBreakStrategy?: "balanced" | "highQuality" | "simple" +} +declare type TextPropsIOS = { + adjustsFontSizeToFit?: boolean + dynamicTypeRamp?: + | "body" + | "callout" + | "caption1" + | "caption2" + | "footnote" + | "headline" + | "largeTitle" + | "subheadline" + | "title1" + | "title2" + | "title3" + lineBreakStrategyIOS?: "hangul-word" | "none" | "push-out" | "standard" + suppressHighlighting?: boolean +} +declare type TextStyle = ____TextStyle_Internal +declare type TextStyleProp = ____TextStyleProp_Internal +declare type Timespan = { + endExtras?: Extras + endTime?: number + startExtras?: Extras + startTime: number + totalTime?: number +} +declare type timing = typeof timing +declare type TimingAnimationConfig = Readonly< + AnimationConfig & { + delay?: number + duration?: number + toValue: + | AnimatedColor_default + | AnimatedInterpolation_default + | AnimatedValue_default + | AnimatedValueXY_default + | number + | RgbaValue + | { + readonly x: number + readonly y: number + } + easing?: (value: number) => number + } +> +declare type ToastAndroid = typeof ToastAndroid +declare type Touchable = typeof Touchable +declare type TouchableHighlight = typeof TouchableHighlight +declare type TouchableHighlightBaseProps = { + readonly activeOpacity?: number + readonly hostRef?: React.Ref> + readonly onHideUnderlay?: () => void + readonly onShowUnderlay?: () => void + readonly style?: ViewStyleProp + readonly testOnly_pressed?: boolean + readonly underlayColor?: ColorValue +} +declare type TouchableHighlightProps = Readonly< + TouchableWithoutFeedbackProps & + AndroidProps & + IOSProps & + TouchableHighlightBaseProps +> +declare class TouchableNativeFeedback extends React.Component< + TouchableNativeFeedbackProps, + TouchableNativeFeedbackState +> { + state: TouchableNativeFeedbackState + static canUseNativeForeground: () => boolean + static Ripple: ( + color: string, + borderless: boolean, + rippleRadius?: null | number | undefined, + ) => { + readonly borderless: boolean + readonly color: number | undefined + readonly rippleRadius: number | undefined + readonly type: "RippleAndroid" + } + static SelectableBackground: (rippleRadius?: null | number | undefined) => { + readonly attribute: "selectableItemBackground" + readonly rippleRadius: number | undefined + readonly type: "ThemeAttrAndroid" + } + static SelectableBackgroundBorderless: ( + rippleRadius?: null | number | undefined, + ) => { + readonly attribute: "selectableItemBackgroundBorderless" + readonly rippleRadius: number | undefined + readonly type: "ThemeAttrAndroid" + } + componentDidMount(): unknown + componentDidUpdate( + prevProps: TouchableNativeFeedbackProps, + prevState: TouchableNativeFeedbackState, + ): void + componentWillUnmount(): void + render(): React.ReactNode +} +declare type TouchableNativeFeedbackProps = Readonly< + TouchableWithoutFeedbackProps & + TouchableNativeFeedbackTVProps & { + background?: + | { + readonly attribute: + | "selectableItemBackground" + | "selectableItemBackgroundBorderless" + readonly rippleRadius: number | undefined + readonly type: "ThemeAttrAndroid" + } + | { + readonly borderless: boolean + readonly color: number | undefined + readonly rippleRadius: number | undefined + readonly type: "RippleAndroid" + } + useForeground?: boolean + } +> +declare type TouchableNativeFeedbackState = { + readonly pressability: Pressability_default +} +declare type TouchableNativeFeedbackTVProps = { + hasTVPreferredFocus?: boolean + nextFocusDown?: number + nextFocusForward?: number + nextFocusLeft?: number + nextFocusRight?: number + nextFocusUp?: number +} +declare type TouchableOpacity = typeof TouchableOpacity +declare type TouchableOpacityBaseProps = { + readonly activeOpacity?: number + readonly hostRef?: React.Ref> + readonly style?: Animated.WithAnimatedValue +} +declare type TouchableOpacityProps = Readonly< + TouchableWithoutFeedbackProps & + TouchableOpacityTVProps & + TouchableOpacityBaseProps +> +declare type TouchableOpacityTVProps = { + readonly hasTVPreferredFocus?: boolean + readonly nextFocusDown?: number + readonly nextFocusForward?: number + readonly nextFocusLeft?: number + readonly nextFocusRight?: number + readonly nextFocusUp?: number +} +declare type TouchableState = + | typeof States.ERROR + | typeof States.NOT_RESPONDER + | typeof States.RESPONDER_ACTIVE_LONG_PRESS_IN + | typeof States.RESPONDER_ACTIVE_LONG_PRESS_OUT + | typeof States.RESPONDER_ACTIVE_PRESS_IN + | typeof States.RESPONDER_ACTIVE_PRESS_OUT + | typeof States.RESPONDER_INACTIVE_PRESS_IN + | typeof States.RESPONDER_INACTIVE_PRESS_OUT +declare function TouchableWithoutFeedback( + props: TouchableWithoutFeedbackProps, +): React.ReactNode +declare type TouchableWithoutFeedbackProps = Readonly< + TouchableWithoutFeedbackPropsAndroid & + TouchableWithoutFeedbackPropsIOS & + AccessibilityProps & { + children?: React.ReactNode + delayLongPress?: number + delayPressIn?: number + delayPressOut?: number + disabled?: boolean + focusable?: boolean + hitSlop?: EdgeInsetsOrSizeProp + id?: string + importantForAccessibility?: "auto" | "no-hide-descendants" | "no" | "yes" + nativeID?: string + onAccessibilityAction?: (event: AccessibilityActionEvent) => unknown + onBlur?: (event: BlurEvent) => unknown + onFocus?: (event: FocusEvent) => unknown + onLayout?: (event: LayoutChangeEvent) => unknown + onLongPress?: (event: GestureResponderEvent) => unknown + onPress?: (event: GestureResponderEvent) => unknown + onPressIn?: (event: GestureResponderEvent) => unknown + onPressOut?: (event: GestureResponderEvent) => unknown + pressRetentionOffset?: EdgeInsetsOrSizeProp + rejectResponderTermination?: boolean + style?: ViewStyleProp + testID?: string + } +> +declare type TouchableWithoutFeedbackPropsAndroid = { + touchSoundDisabled?: boolean +} +declare type TouchableWithoutFeedbackPropsIOS = {} +declare type TouchEventProps = { + readonly onTouchCancel?: (e: GestureResponderEvent) => void + readonly onTouchCancelCapture?: (e: GestureResponderEvent) => void + readonly onTouchEnd?: (e: GestureResponderEvent) => void + readonly onTouchEndCapture?: (e: GestureResponderEvent) => void + readonly onTouchMove?: (e: GestureResponderEvent) => void + readonly onTouchMoveCapture?: (e: GestureResponderEvent) => void + readonly onTouchStart?: (e: GestureResponderEvent) => void + readonly onTouchStartCapture?: (e: GestureResponderEvent) => void +} +declare type TransformsStyle = ____TransformStyle_Internal +declare interface TurboModule extends DEPRECATED_RCTExport {} +declare namespace TurboModuleRegistry { + export { get, getEnforcing } +} +declare type TVViewPropsIOS = { + readonly hasTVPreferredFocus?: boolean + readonly isTVSelectable?: boolean + readonly tvParallaxMagnification?: number + readonly tvParallaxShiftDistanceX?: number + readonly tvParallaxShiftDistanceY?: number + readonly tvParallaxTiltAngle?: number +} +declare type UIManager = typeof UIManager +declare interface UIManagerJSInterface extends Spec_2 { + readonly getViewManagerConfig: (viewManagerName: string) => Object + readonly hasViewManagerConfig: (viewManagerName: string) => boolean +} +declare type unforkEvent = typeof unforkEvent +declare function unforkEventImpl( + event: (AnimatedEvent | null | undefined) | (Function | null | undefined), + listener: Function, +): void +declare function unmountApplicationComponentAtRootTag(rootTag: RootTag): void +declare type UnsafeEventObject = Object +declare type UnsafeMixed = unknown +declare type UnsafeNativeEventObject = Object +declare type UnsafeObject = Object +declare function useAnimatedValue( + initialValue: number, + config?: Animated.AnimatedConfig | null | undefined, +): Animated.Value +declare function useColorScheme(): ColorSchemeName | null | undefined +declare function useWindowDimensions(): DisplayMetrics | DisplayMetricsAndroid +declare type UTFSequence = typeof UTFSequence +declare type Value = null | { + horizontal: boolean +} +declare type ValueOfUnion = T extends any + ? K extends keyof T + ? T[K] + : never + : never +declare type ValueXYListenerCallback = (value: { + x: number + y: number +}) => unknown +declare type Vibration = typeof Vibration +declare function View( + props: ViewProps & { + ref?: React.Ref> + }, +): React.ReactNode +declare type ViewabilityConfig = { + readonly itemVisiblePercentThreshold?: number + readonly minimumViewTime?: number + readonly viewAreaCoveragePercentThreshold?: number + readonly waitForInteraction?: boolean +} +declare type ViewabilityConfigCallbackPair = { + viewabilityConfig: ViewabilityConfig + onViewableItemsChanged: (info: { + changed: Array + viewableItems: Array + }) => void +} +declare class ViewabilityHelper_default { + computeViewableItems( + props: CellMetricProps, + scrollOffset: number, + viewportHeight: number, + listMetrics: ListMetricsAggregator_default, + renderRange?: { + first: number + last: number + }, + ): Array + constructor(config?: ViewabilityConfig) + dispose(): void + onUpdate( + props: CellMetricProps, + scrollOffset: number, + viewportHeight: number, + listMetrics: ListMetricsAggregator_default, + createViewToken: ( + index: number, + isViewable: boolean, + props: CellMetricProps, + ) => ViewToken, + onViewableItemsChanged: ($$PARAM_0$$: { + changed: Array + viewableItems: Array + }) => void, + renderRange?: { + first: number + last: number + }, + ): void + recordInteraction(): void + resetViewableIndices(): void +} +declare type ViewabilityHelperT = typeof ViewabilityHelper_default +declare type ViewBaseProps = { + readonly children?: React.ReactNode + readonly collapsable?: boolean + readonly collapsableChildren?: boolean + readonly hitSlop?: EdgeInsetsOrSizeProp + readonly id?: string + readonly nativeID?: string + readonly needsOffscreenAlphaCompositing?: boolean + readonly pointerEvents?: "auto" | "box-none" | "box-only" | "none" + readonly removeClippedSubviews?: boolean + readonly style?: ViewStyleProp + readonly testID?: string +} +declare type ViewConfig = { + readonly baseModuleName?: string + readonly bubblingEventTypes?: { + readonly [eventName: string]: { + readonly phasedRegistrationNames: { + readonly bubbled: string + readonly captured: string + readonly skipBubbling?: boolean + } + } + } + readonly Commands?: { + readonly [commandName: string]: number + } + readonly Constants?: { + readonly [name: string]: unknown + } + readonly directEventTypes?: { + readonly [eventName: string]: { + readonly registrationName: string + } + } + readonly Manager?: string + readonly NativeProps?: { + readonly [propName: string]: string + } + readonly supportsRawText?: boolean + readonly uiViewClassName: string + readonly validAttributes: AttributeConfiguration +} +declare type ViewProps = Readonly< + DirectEventProps & + GestureResponderHandlers & + MouseEventProps & + PointerEventProps & + FocusEventProps & + TouchEventProps & + ViewPropsAndroid & + ViewPropsIOS & + AccessibilityProps & + ViewBaseProps +> +declare type ViewPropsAndroid = { + readonly focusable?: boolean + readonly hasTVPreferredFocus?: boolean + readonly nativeBackgroundAndroid?: AndroidDrawable + readonly nativeForegroundAndroid?: AndroidDrawable + readonly nextFocusDown?: number + readonly nextFocusForward?: number + readonly nextFocusLeft?: number + readonly nextFocusRight?: number + readonly nextFocusUp?: number + readonly onClick?: (event: GestureResponderEvent) => unknown + readonly renderToHardwareTextureAndroid?: boolean + readonly tabIndex?: -1 | 0 +} +declare type ViewPropsIOS = { + readonly shouldRasterizeIOS?: boolean +} +declare type ViewStyle = ____ViewStyle_Internal +declare type ViewStyleProp = ____ViewStyleProp_Internal +declare type ViewToken = { + index: number | undefined + isViewable: boolean + item: any + key: string + section?: any +} +declare type VirtualizedList = typeof VirtualizedList +declare class VirtualizedList_default extends StateSafePureComponent_default< + VirtualizedListProps, + State +> { + static contextType: typeof VirtualizedListContext + state: State + componentDidMount(): void + componentDidUpdate(prevProps: VirtualizedListProps): void + componentWillUnmount(): void + constructor(props: VirtualizedListProps) + flashScrollIndicators(): void + static getDerivedStateFromProps( + newProps: VirtualizedListProps, + prevState: State, + ): State + getScrollableNode(): null | number | undefined + getScrollRef(): null | React.ComponentRef | undefined + getScrollResponder(): null | ScrollResponderType | undefined + hasMore(): boolean + measureLayoutRelativeToContainingList(): void + recordInteraction(): void + render(): React.ReactNode + scrollToEnd( + params?: + | null + | undefined + | { + animated?: boolean + }, + ): void + scrollToIndex(params: { + animated?: boolean + index: number + viewOffset?: number + viewPosition?: number + }): any + scrollToItem(params: { + animated?: boolean + item: Item + viewOffset?: number + viewPosition?: number + }): void + scrollToOffset(params: { animated?: boolean; offset: number }): void + setNativeProps(props: Object): void +} +declare type VirtualizedListContext = typeof VirtualizedListContext +declare function VirtualizedListContextResetter($$PARAM_0$$: { + children: React.ReactNode +}): React.ReactNode +declare type VirtualizedListContextResetterT = + typeof VirtualizedListContextResetter +declare type VirtualizedListProps = ScrollViewProps & + RequiredVirtualizedListProps & + OptionalVirtualizedListProps +declare type VirtualizedListT = typeof VirtualizedList_default +declare type VirtualizedListT_2 = typeof VirtualizedList_default +declare type VirtualizedListType = typeof $$index.VirtualizedList +declare type VirtualizedSectionList = typeof VirtualizedSectionList +declare type VirtualizedSectionListProps< + ItemT, + SectionT = DefaultVirtualizedSectionT, +> = RequiredVirtualizedSectionListProps & + OptionalVirtualizedSectionListProps & + Omit +declare type VirtualizedSectionListType = typeof $$index.VirtualizedSectionList +declare enum VirtualViewMode { + Hidden = 2, + Prerender = 1, + Visible = 0, +} +declare namespace VirtualViewMode { + export function cast(value: null | number | undefined): VirtualViewMode + export function isValid( + value: null | number | undefined, + ): value is VirtualViewMode + export function members(): IterableIterator + export function getName(value: VirtualViewMode): string +} +declare type WebPlatform = { + OS: "web" + select: (spec: PlatformSelectSpec) => T + get constants(): { + reactNativeVersion: { + major: number + minor: number + patch: number + prerelease: string | undefined + } + } + get isDisableAnimations(): boolean + get isTesting(): boolean + get isTV(): boolean + get Version(): void +} +declare type WindowsPlatform = { + OS: "windows" + select: (spec: PlatformSelectSpec) => T + get constants(): { + isDisableAnimations?: boolean + isTesting: boolean + osVersion: number + reactNativeVersion: { + major: number + minor: number + patch: number + prerelease: string | undefined + } + reactNativeWindowsVersion: { + major: number + minor: number + patch: number + } + } + get isDisableAnimations(): boolean + get isTesting(): boolean + get isTV(): boolean + get Version(): number +} +declare type WithAnimatedValue = T extends Builtin | Nullable + ? T + : T extends Primitive + ? + | AnimatedAddition_default + | AnimatedDiffClamp_default + | AnimatedDivision_default + | AnimatedInterpolation_default + | AnimatedInterpolation_default + | AnimatedInterpolation_default + | AnimatedModulo_default + | AnimatedMultiplication_default + | AnimatedNode_default + | AnimatedSubtraction_default + | AnimatedValue_default + | T + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { readonly [K in keyof T]: WithAnimatedValue } + : T +declare type WithDefault< + Type extends DefaultTypes, + Value extends (null | Type | undefined) | string, +> = null | Type | undefined +declare function Wrapper_default( + $$PARAM_0$$: ModalRefProps & ModalProps, +): React.ReactNode +declare type WrapperComponentProvider = ( + appParameters: Object, +) => React.ComponentType +export { + AccessibilityActionEvent, // 9247c3f0 + AccessibilityInfo, // 70604904 + AccessibilityProps, // 5a2836fc + AccessibilityRole, // f2f2e066 + AccessibilityState, // b0c2b3f7 + AccessibilityValue, // cf8bcb74 + ActionSheetIOS, // 88e6bfb0 + ActionSheetIOSOptions, // 1756eb5a + ActivityIndicator, // 8d041a45 + ActivityIndicatorProps, // 0edeb628 + Alert, // 5bf12165 + AlertButton, // bf1a3b60 + AlertButtonStyle, // ec9fb242 + AlertOptions, // a0cdac0f + AlertType, // 5ab91217 + AndroidKeyboardEvent, // e03becc8 + Animated, // b3949f33 + AppConfig, // ebddad4b + AppRegistry, // 6cdee1d6 + AppState, // f7097b1b + AppStateEvent, // 80f034c3 + AppStateStatus, // 447e5ef2 + Appearance, // b23e8105 + AutoCapitalize, // c0e857a0 + BackHandler, // a9f9bad9 + BackPressEventName, // 4620fb76 + BlurEvent, // ab745200 + BoxShadowValue, // b679703f + Button, // dd130b61 + ButtonProps, // 99495f51 + Clipboard, // 9b8c878e + CodegenTypes, // 1b38ac82 + ColorSchemeName, // 31a4350e + ColorValue, // 98989a8f + ComponentProvider, // b5c60ddd + ComponentProviderInstrumentationHook, // 9f640048 + CursorValue, // 26522595 + DevMenu, // 99e9fcd6 + DevSettings, // 1a2f3a5f + DeviceEventEmitter, // 31dc96e7 + DeviceInfo, // cc37eaec + DeviceInfoConstants, // 279e7858 + DimensionValue, // b163a381 + Dimensions, // 980ef68c + DimensionsPayload, // 653bc26c + DisplayMetrics, // 1dc35cef + DisplayMetricsAndroid, // 872e62eb + DrawerLayoutAndroid, // 14121b61 + DrawerLayoutAndroidProps, // 11c0dfe2 + DrawerSlideEvent, // ad024574 + DropShadowValue, // e9df2606 + DynamicColorIOS, // 1f9b3410 + DynamicColorIOSTuple, // 023ce58e + Easing, // b624f91d + EasingFunction, // 14aee4c0 + EdgeInsetsValue, // bd44afe6 + EmitterSubscription, // de50c359 + EnterKeyHintTypeOptions, // 8314de78 + ErrorUtils, // 38fb909e + EventSubscription, // b8d084aa + ExtendedExceptionData, // 5a6ccf5a + FilterFunction, // bf24c0e3 + FlatList, // 0b12ef25 + FlatListProps, // d185db31 + FocusEvent, // 1dc2b592 + FontVariant, // 7c7558bb + GestureResponderEvent, // 9c9a1b0d + GestureResponderHandlers, // 2c0e77cb + Handle, // 2d65285d + HostComponent, // b6281cf9 + HostInstance, // b159a964 + I18nManager, // f2fa58ce + IOSKeyboardEvent, // e67bfe3a + IgnorePattern, // ec6f6ece + Image, // 04474205 + ImageBackground, // b588909c + ImageBackgroundProps, // f9de269c + ImageErrorEvent, // 66044485 + ImageLoadEvent, // 62e6be9b + ImageProgressEventIOS, // 3d6ffb7a + ImageProps, // d77401e6 + ImagePropsAndroid, // 9fd9bcbb + ImagePropsBase, // efd768f1 + ImagePropsIOS, // c788030b + ImageRequireSource, // 681d683b + ImageResolvedAssetSource, // f3060931 + ImageSize, // 1c47cf88 + ImageSource, // 48c7f316 + ImageSourcePropType, // bfb5e5c6 + ImageStyle, // 8b22ac76 + ImageURISource, // 016eb083 + InputAccessoryView, // 591855d8 + InputAccessoryViewProps, // 4b6f5450 + InputModeOptions, // 4e8581b9 + Insets, // e7fe432a + InteractionManager, // 301bfa63 + Keyboard, // 87311c77 + KeyboardAvoidingView, // ab2d7999 + KeyboardAvoidingViewProps, // 8e348419 + KeyboardEvent, // c3f895d4 + KeyboardEventEasing, // af4091c8 + KeyboardEventName, // 59299ad6 + KeyboardMetrics, // 7997b799 + KeyboardTypeOptions, // ae44efe7 + LayoutAnimation, // 795a5df3 + LayoutAnimationAnim, // 074da826 + LayoutAnimationConfig, // 5e200571 + LayoutAnimationProperties, // 84e6e197 + LayoutAnimationProperty, // 52995f01 + LayoutAnimationType, // 2da0a29b + LayoutAnimationTypes, // 081b3bde + LayoutChangeEvent, // 697f2b5c + LayoutConformanceProps, // 055f03b8 + LayoutRectangle, // 6601b294 + Linking, // 292de0a0 + ListRenderItem, // b5353fd8 + ListRenderItemInfo, // e8595b03 + LogBox, // b58880c6 + LogData, // 89af6d4c + MeasureInWindowOnSuccessCallback, // a285f598 + MeasureLayoutOnSuccessCallback, // 3592502a + MeasureOnSuccessCallback, // 82824e59 + Modal, // 78e8a79d + ModalBaseProps, // 574f2b2d + ModalProps, // 3fb62261 + ModalPropsAndroid, // 515fb173 + ModalPropsIOS, // 6053cb61 + ModeChangeEvent, // 0dc5e81f + MouseEvent, // d432147f + NativeAppEventEmitter, // b4d20c1d + NativeColorValue, // d2094c29 + NativeDialogManagerAndroid, // 6254873e + NativeEventEmitter, // d72906cc + NativeEventSubscription, // de3942e7 + NativeMethods, // 5adf5f75 + NativeMethodsMixin, // 518cbd6c + NativeModules, // 1cf72876 + NativeMouseEvent, // 2d5b5c9f + NativePointerEvent, // 5f27ae9c + NativeScrollEvent, // caad7f53 + NativeSyntheticEvent, // 29455160 + NativeTouchEvent, // 59b676df + NativeUIEvent, // 44ac26ac + Networking, // b674447b + OpaqueColorValue, // 25f3fa5b + PanResponder, // 98a9b6fc + PanResponderCallbacks, // 0567f479 + PanResponderGestureState, // 54baf558 + PanResponderInstance, // c8b0d00c + Permission, // 06473f4f + PermissionStatus, // 4b7de97b + PermissionsAndroid, // 0c1619e7 + PixelRatio, // 10d9e32d + Platform, // dc0f5740 + PlatformColor, // be964947 + PlatformOSType, // 0a17561e + PlatformSelectSpec, // 09ed7758 + PointValue, // 69db075f + PointerEvent, // 3c454015 + Pressable, // 3c6e4eb9 + PressableAndroidRippleConfig, // 42bc9727 + PressableProps, // 4d37b376 + PressableStateCallbackType, // 9af36561 + ProcessedColorValue, // 33f74304 + ProgressBarAndroid, // 03e66cf5 + ProgressBarAndroidProps, // 9302458b + PromiseTask, // 5102c862 + PublicRootInstance, // 8040afd7 + PublicTextInstance, // 7d73f802 + PushNotificationEventName, // 84e7e150 + PushNotificationIOS, // b4d1fe78 + PushNotificationPermissions, // c2e7ae4f + Rationale, // 5df1b1c1 + RefreshControl, // effd2a00 + RefreshControlProps, // fca5a05f + RefreshControlPropsAndroid, // 99f64c97 + RefreshControlPropsIOS, // 72a36381 + Registry, // e1ed403e + ResponderSyntheticEvent, // dccf8514 + ReturnKeyTypeOptions, // afd47ba3 + Role, // af7b889d + RootTag, // 3cd10504 + RootTagContext, // 15b60335 + RootViewStyleProvider, // cc8d50e9 + Runnable, // 2cb32c54 + Runnables, // d3749ae1 + SafeAreaView, // 4364c7bb + ScaledSize, // 07e417c7 + ScrollEvent, // 865efb2e + ScrollResponderType, // 525b353d + ScrollToLocationParamsType, // d7ecdad1 + ScrollView, // 7fb7c469 + ScrollViewImperativeMethods, // 97a0b5ac + ScrollViewProps, // b276b839 + ScrollViewPropsAndroid, // 84e2134b + ScrollViewPropsIOS, // a2902f33 + ScrollViewScrollToOptions, // 3313411e + SectionBase, // 0ccaedac + SectionList, // ba8c31d9 + SectionListData, // 1c80bb2e + SectionListProps, // 177096d2 + SectionListRenderItem, // cffebb53 + SectionListRenderItemInfo, // 946c2128 + Separators, // 6a45f7e3 + Settings, // 4282b0da + Share, // e4591b32 + ShareAction, // ead1004a + ShareActionSheetError, // 55e4f451 + ShareActionSheetIOSOptions, // eff574f5 + ShareContent, // 7c627896 + ShareOptions, // 800c3a4e + SimpleTask, // 0e619d11 + StatusBar, // 5e08d563 + StatusBarAnimation, // 7fd047e6 + StatusBarProps, // 06c98add + StatusBarStyle, // 986b2051 + StyleProp, // fa0e9b4a + StyleSheet, // 02b98c20 + SubmitBehavior, // c4ddf490 + Switch, // aebc9941 + SwitchChangeEvent, // 056868be + SwitchProps, // 57b2101f + Systrace, // b5aa21fc + TVViewPropsIOS, // 330ce7b5 + TargetedEvent, // 16e98910 + TaskProvider, // 266dedf2 + Text, // bd525aa9 + TextContentType, // 239b3ecc + TextInput, // 282b394e + TextInputAndroidProps, // 3f09ce49 + TextInputChangeEvent, // 9cb24681 + TextInputContentSizeChangeEvent, // f6f7ecae + TextInputEndEditingEvent, // 254671ea + TextInputFocusEvent, // 29cebb63 + TextInputIOSProps, // 0d05a855 + TextInputKeyPressEvent, // 8047f716 + TextInputProps, // 5cda62e0 + TextInputSelectionChangeEvent, // 3a657f0b + TextInputSubmitEditingEvent, // b350617f + TextLayoutEvent, // e289bd3c + TextProps, // 0f0be34d + TextStyle, // f3404e2b + ToastAndroid, // b4875e35 + Touchable, // 93eb6c63 + TouchableHighlight, // b4304a98 + TouchableHighlightProps, // 7212b9cf + TouchableNativeFeedback, // 1562b2eb + TouchableNativeFeedbackProps, // 8a4eed44 + TouchableOpacity, // 7e33acfd + TouchableOpacityProps, // 189c11df + TouchableWithoutFeedback, // d5fb023d + TouchableWithoutFeedbackProps, // 26d3cf4e + TransformsStyle, // 65e70f18 + TurboModule, // dfe29706 + TurboModuleRegistry, // badfcca2 + UIManager, // 8d2c8281 + UTFSequence, // baacd11b + Vibration, // 315e131d + View, // 75d9e33b + ViewProps, // 0ab8ceda + ViewPropsAndroid, // f3d007c3 + ViewPropsIOS, // 58ee19bf + ViewStyle, // c2db0e6e + VirtualViewMode, // 85a69ef6 + VirtualizedList, // 4d513939 + VirtualizedListProps, // 8526b87a + VirtualizedSectionList, // 446ba0df + VirtualizedSectionListProps, // de510cb4 + WrapperComponentProvider, // 9cf3844c + codegenNativeCommands, // e16d62f7 + codegenNativeComponent, // ed4c8103 + findNodeHandle, // e9bae561 + processColor, // 00453092 + registerCallableModule, // 86b65226 + requireNativeComponent, // e659aa32 + useAnimatedValue, // 2c80bbc2 + useColorScheme, // c216d6f7 + useWindowDimensions, // bb4b683f +} diff --git a/packages/react-native/tsconfig.json b/packages/react-native/tsconfig.json new file mode 100644 index 00000000000000..79adbaf617c5bd --- /dev/null +++ b/packages/react-native/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "strictFunctionTypes": false + }, + "include": ["ReactNativeApi.d.ts"] +} diff --git a/private/react-native-bots/dangerfile.js b/private/react-native-bots/dangerfile.js index ddec0bdbc60d13..1bff20819a9709 100644 --- a/private/react-native-bots/dangerfile.js +++ b/private/react-native-bots/dangerfile.js @@ -11,6 +11,8 @@ 'use strict'; const {danger, fail, warn} = require('danger'); +const fs = require('fs'); +const path = require('path'); const body = danger.github.pr.body?.toLowerCase() ?? ''; @@ -28,6 +30,25 @@ const isFromPhabricator = body_contains('differential revision:'); // Provides advice if a summary section is missing, or body is too short const includesSummary = body_contains('## summary', 'summary:'); +const snapshot_output = JSON.parse( + fs.readFileSync( + path.join( + process.env.RUNNER_TEMP, + 'diff-js-api-breaking-changes/output.json', + ), + 'utf8', + ), +); +if (snapshot_output && snapshot_output.result !== 'NON_BREAKING') { + const title = ':exclamation: JavaScript API change detected'; + const idea = + 'This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API. ' + + 'Please include a clear changelog message. ' + + 'This change will be subject to extra review.\n\n' + + `This change was flagged as: ${snapshot_output.result}`; + warn(`${title} - ${idea}`); +} + const hasNoUsefulBody = !danger.github.pr.body || danger.github.pr.body.length < 50; const hasTooShortAHumanSummary = diff --git a/scripts/diff-api-snapshot/__tests__/diffApiSnapshot-test.js b/scripts/diff-api-snapshot/__tests__/diffApiSnapshot-test.js index ee88834cfd2012..0216652ad404ca 100644 --- a/scripts/diff-api-snapshot/__tests__/diffApiSnapshot-test.js +++ b/scripts/diff-api-snapshot/__tests__/diffApiSnapshot-test.js @@ -17,22 +17,31 @@ describe('diffApiSnapshot', () => { test('should detect breaking change when a statement is deleted', () => { const prevSnapshot = ` import * as React from 'react'; - export declare type AccessibilityActionEvent = NativeSyntheticEvent< + declare type AccessibilityActionEvent = NativeSyntheticEvent< Readonly<{ actionName: string; }> >; - export declare const AccessibilityInfo: typeof AccessibilityInfo_2; - export declare const DeletedExport: string; + declare const AccessibilityInfo: typeof AccessibilityInfo_2; + declare const DeletedExport: string; + export { + AccessibilityActionEvent, // 00000001 + AccessibilityInfo, // 00000002 + DeletedExport, // 00000003 + } `; const newSnapshot = ` import * as React from 'react'; - export declare type AccessibilityActionEvent = NativeSyntheticEvent< + declare type AccessibilityActionEvent = NativeSyntheticEvent< Readonly<{ actionName: string; }> >; - export declare const AccessibilityInfo: typeof AccessibilityInfo_2; + declare const AccessibilityInfo: typeof AccessibilityInfo_2; + export { + AccessibilityActionEvent, // 00000001 + AccessibilityInfo, // 00000002 + } `; const res = diffApiSnapshot(prevSnapshot, newSnapshot); @@ -48,7 +57,11 @@ describe('diffApiSnapshot', () => { actionName: string; }> >; - export declare const AccessibilityInfo: typeof AccessibilityInfo_2; + export declare const Foo: string; + export { + AccessibilityActionEvent, // 00000001 + Foo, // 00000002 + } `; const newSnapshot = ` import * as React from 'react'; @@ -57,33 +70,46 @@ describe('diffApiSnapshot', () => { actionName: string; }> >; - export declare const AccessibilityInfo: typeof AccessibilityInfo_3; // Changed from AccessibilityInfo_2 to AccessibilityInfo_3 + export declare const Foo: number; + export { + AccessibilityActionEvent, // 00000001 + Foo, // 00000003 + } `; const res = diffApiSnapshot(prevSnapshot, newSnapshot); expect(res.result).toBe(Result.BREAKING); - expect(res.changedApis).toEqual(['AccessibilityInfo']); + expect(res.changedApis).toEqual(['Foo']); }); test('should detect potentially not breaking change when a statement is added', () => { const prevSnapshot = ` import * as React from 'react'; - export declare type AccessibilityActionEvent = NativeSyntheticEvent< + declare type AccessibilityActionEvent = NativeSyntheticEvent< Readonly<{ actionName: string; }> >; - export declare const AccessibilityInfo: typeof AccessibilityInfo_2; + declare const AccessibilityInfo: typeof AccessibilityInfo_2; + export { + AccessibilityActionEvent, // 00000001 + AccessibilityInfo, // 00000002 + } `; const newSnapshot = ` import * as React from 'react'; - export declare type AccessibilityActionEvent = NativeSyntheticEvent< + declare type AccessibilityActionEvent = NativeSyntheticEvent< Readonly<{ actionName: string; }> >; - export declare const AccessibilityInfo: typeof AccessibilityInfo_2; - export declare const NewExport: string; // New export added + declare const AccessibilityInfo: typeof AccessibilityInfo_2; + declare const NewExport: string; // New export added + export { + AccessibilityActionEvent, // 00000001 + AccessibilityInfo, // 00000002 + NewExport, // 00000003 + } `; const res = diffApiSnapshot(prevSnapshot, newSnapshot); @@ -94,85 +120,20 @@ describe('diffApiSnapshot', () => { test('should detect not breaking change when nothing is changed', () => { const prevSnapshot = ` import * as React from 'react'; - export declare type AccessibilityActionEvent = NativeSyntheticEvent< + declare type AccessibilityActionEvent = NativeSyntheticEvent< Readonly<{ actionName: string; }> >; - export declare const AccessibilityInfo: typeof AccessibilityInfo_2; - `; - - const res = diffApiSnapshot(prevSnapshot, prevSnapshot); - expect(res.result).toBe(Result.NON_BREAKING); - expect(res.changedApis).toEqual([]); - }); - - test('should handle complex type declarations', () => { - const prevSnapshot = ` - import * as React from 'react'; - export declare type ComplexType = { - prop1: string; - prop2: number; - prop3: { - nestedProp1: boolean; - nestedProp2: Array; - }; - }; - `; - const newSnapshot = ` - import * as React from 'react'; - export declare type ComplexType = { - prop1: string; - prop2: number; - prop3: { - nestedProp1: boolean; - nestedProp2: Array; - nestedProp3: number; // Added property - }; - }; - `; + declare const AccessibilityInfo: typeof AccessibilityInfo_2; - const res = diffApiSnapshot(prevSnapshot, newSnapshot); - expect(res.result).toBe(Result.BREAKING); - expect(res.changedApis).toEqual(['ComplexType']); - }); - - test('should handle interface declarations', () => { - const prevSnapshot = ` - import * as React from 'react'; - export interface TestInterface { - method1(): void; - property1: string; + export { + AccessibilityActionEvent, // 00000001 + AccessibilityInfo, // 00000002 } `; - const newSnapshot = ` - import * as React from 'react'; - export interface TestInterface { - method1(): void; - property1: string; - method2(): number; // Added method - } - `; - - const res = diffApiSnapshot(prevSnapshot, newSnapshot); - expect(res.result).toBe(Result.BREAKING); - expect(res.changedApis).toEqual(['TestInterface']); - }); - - test('should handle const and type of the same name', () => { - const prevSnapshot = ` - import * as React from 'react'; - export declare const AccessibilityInfo: typeof AccessibilityInfo_2; - export declare type AccessibilityInfo = typeof AccessibilityInfo; - `; - const newSnapshot = ` - import * as React from 'react'; - export declare type AccessibilityInfo = typeof AccessibilityInfo; - export declare const AccessibilityInfo: typeof AccessibilityInfo_2; - `; - - const res = diffApiSnapshot(prevSnapshot, newSnapshot); + const res = diffApiSnapshot(prevSnapshot, prevSnapshot); expect(res.result).toBe(Result.NON_BREAKING); expect(res.changedApis).toEqual([]); }); diff --git a/scripts/diff-api-snapshot/diffApiSnapshot.js b/scripts/diff-api-snapshot/diffApiSnapshot.js index 2bb586ebd4ffc8..684accce7d0297 100644 --- a/scripts/diff-api-snapshot/diffApiSnapshot.js +++ b/scripts/diff-api-snapshot/diffApiSnapshot.js @@ -10,7 +10,7 @@ */ const babel = require('@babel/core'); -const generate = require('@babel/generator').default; +const t = require('@babel/types'); const Result = { BREAKING: 'BREAKING', @@ -23,6 +23,9 @@ type Output = { changedApis: Array, }; +type Hash = string; +type APISpecifier = string; + function diffApiSnapshot(prevSnapshot: string, newSnapshot: string): Output { const prevSnapshotAST = babel.parseSync(prevSnapshot, { plugins: ['@babel/plugin-syntax-typescript'], @@ -30,160 +33,99 @@ function diffApiSnapshot(prevSnapshot: string, newSnapshot: string): Output { const newSnapshotAST = babel.parseSync(newSnapshot, { plugins: ['@babel/plugin-syntax-typescript'], }); - const prevStatements = getExportedStatements(prevSnapshotAST); - const newStatements = getExportedStatements(newSnapshotAST); - return analyzeStatements(prevStatements, newStatements); -} + const prevSpecHashPair = getExportedSymbols(prevSnapshotAST); + const newSpecHashPair = getExportedSymbols(newSnapshotAST); -function getExportedStatements( - ast: BabelNodeFile, -): Array { - return ast.program.body.filter( - statement => statement.type === 'ExportNamedDeclaration', - ); + if (prevSpecHashPair == null || newSpecHashPair == null) { + return { + result: Result.BREAKING, + changedApis: [], + }; + } + + return analyzeSpecHashPairs(prevSpecHashPair, newSpecHashPair); } -function analyzeStatements( - prevStatements: Array, - newStatements: Array, +function analyzeSpecHashPairs( + prevSpecHashPairs: Array<[APISpecifier, Hash]>, + newSpecHashPairs: Array<[APISpecifier, Hash]>, ): Output { const output = { result: Result.NON_BREAKING, changedApis: [], } as Output; - // Create a mapping between prev and new statements - type Pair = Map<'prev' | 'new', BabelNodeExportNamedDeclaration>; - const mapping: Array<[string, Pair]> = []; - const prevNodesMapping = getExportedNodesNames(prevStatements); - const newNodesMapping = Object.fromEntries( - getExportedNodesNames(newStatements), - ); - - for (const [name, prevNode] of prevNodesMapping) { - if (newNodesMapping[name]) { - const pairMap: Pair = new Map(); - pairMap.set('new', newNodesMapping[name]); - pairMap.set('prev', prevNode); - mapping.push([name, pairMap]); - // remove the node to check if there are any new nodes later - delete newNodesMapping[name]; + const newSpecHashMapping = Object.fromEntries(newSpecHashPairs); + for (const [name, hash] of prevSpecHashPairs) { + if (newSpecHashMapping[name]) { + const newHash = newSpecHashMapping[name]; + if (hash !== newHash) { + // The hash has changed which means that the statement has changed + output.result = Result.BREAKING; + output.changedApis.push(name); + } + delete newSpecHashMapping[name]; } else { // There is no statement of that name in the new rollup which means that: // 1. This statement was entirely removed // 2. This statement was renamed // 3. It is not public anymore output.result = Result.BREAKING; - output.changedApis.push(stripSuffix(name)); + output.changedApis.push(name); } } - for (const [name, pair] of mapping) { - const prevNode = pair.get('prev'); - const newNode = pair.get('new'); - if (!prevNode || !newNode) { - throw new Error('Node in pair is undefined'); - } - if (didStatementChange(prevNode, newNode)) { - output.result = Result.BREAKING; - output.changedApis.push(stripSuffix(name)); - } - } - - // if all prev nodes are matched and there are some new nodes left if ( output.result === Result.NON_BREAKING && - Object.keys(newNodesMapping).length > 0 + Object.keys(newSpecHashMapping).length > 0 ) { - // New statement added output.result = Result.POTENTIALLY_NON_BREAKING; - for (const name of Object.keys(newNodesMapping)) { - output.changedApis.push(stripSuffix(name)); + for (const name of Object.keys(newSpecHashMapping)) { + // saving new APIs + output.changedApis.push(name); } } return output; } -function getExportedNodesNames( - nodes: Array, -): Array<[string, BabelNodeExportNamedDeclaration]> { - const nodeNames: Array<[string, BabelNodeExportNamedDeclaration]> = []; - nodes.forEach(node => { - if (node.declaration) { - let name = getExportedNodeName(node); - // for declare const/type case we get two statements with the same name - // export declare const foo = string; - // export declare type foo = typeof foo; - // we add a _type and _var suffix to differentiate them - if (node.declaration?.type === 'TSTypeAliasDeclaration') { - name += '__type'; - } else if (node.declaration?.type === 'VariableDeclaration') { - name += '__var'; +function getExportedSymbols( + ast: BabelNodeFile, +): Array<[APISpecifier, Hash]> | null { + for (const nodePath of ast.program.body) { + if ( + t.isExportNamedDeclaration(nodePath) && + !nodePath.declaration && + nodePath.specifiers != null + ) { + const specifiers = nodePath.specifiers; + const result: Array<[APISpecifier, Hash]> = []; + for (let i = 0; i < specifiers.length; i++) { + const specifier = specifiers[i]; + const name = specifier.exported.name || ''; + const comment = + specifier.leadingComments && specifier.leadingComments.length > 0 + ? specifier.leadingComments[0]?.value + : ''; + + if (i > 0) { + result[i - 1][1] = comment; + } + result.push([name, comment]); } - nodeNames.push([name, node]); - } - }); - return nodeNames; -} - -function stripSuffix(name: string): string { - const regex = /(__type|__var)$/; - return name.replace(regex, ''); -} - -function getExportedNodeName(node: BabelNodeExportNamedDeclaration): string { - if (node.declaration?.type === 'TSTypeAliasDeclaration') { - return node.declaration.id.name; - } else if (node.declaration?.type === 'VariableDeclaration') { - if (node.declaration.declarations.length !== 1) { - throw new Error('Unsupported number of variable declarations'); - } - const variableDeclaration = node.declaration.declarations[0]; - if (variableDeclaration.id.type !== 'Identifier') { - throw new Error('Variable declaration id type is not Identifier'); - } - - return variableDeclaration.id.name; - } else if (node.declaration?.type === 'ClassDeclaration') { - if (!node.declaration.id) { - throw new Error('Class declaration id is undefined'); - } - - return node.declaration.id.name; - } else if (node.declaration?.type === 'TSModuleDeclaration') { - if (node.declaration.id.type === 'StringLiteral') { - return node.declaration.id.value; - } else { - return node.declaration.id.name; + const lastSpec = specifiers[specifiers.length - 1]; + const comment = + lastSpec.trailingComments && lastSpec.trailingComments.length > 0 + ? lastSpec.trailingComments[0]?.value + : ''; + result[result.length - 1][1] = comment; + return result; } - } else if (node.declaration?.type === 'TSDeclareFunction') { - if (!node.declaration.id) { - throw new Error('Function declaration id is undefined'); - } - return node.declaration.id?.name; - } else if (node.declaration?.type === 'TSInterfaceDeclaration') { - return node.declaration.id.name; } - throw new Error('Unsupported node declaration type'); -} - -function didStatementChange( - previousAST: BabelNodeStatement, - newAST: BabelNodeStatement, -) { - const previousCode = getMinifiedCode(previousAST); - const newCode = getMinifiedCode(newAST); - return previousCode !== newCode; -} - -function getMinifiedCode(ast: BabelNodeStatement) { - return generate(ast, { - minified: true, - }).code; + return null; } module.exports = {diffApiSnapshot, Result}; diff --git a/scripts/run-ci-javascript-tests.js b/scripts/run-ci-javascript-tests.js index c34be60523cf5e..c208c29f2aae5a 100644 --- a/scripts/run-ci-javascript-tests.js +++ b/scripts/run-ci-javascript-tests.js @@ -56,6 +56,15 @@ try { throw Error(exitCode); } + describe('Test: Validate JS API snapshot'); + if (execSync(`${YARN_BINARY} run build-types --validate`).code) { + echo( + 'JS API snapshot validation failed. Please run `yarn build-types` to update the snapshot.', + ); + exitCode = 1; + throw Error(exitCode); + } + describe('Test: Flow check'); const flowCommand = FLOW_BINARY == null