diff --git a/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts b/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts index 3651226855..749d44e367 100644 --- a/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +++ b/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts @@ -8,7 +8,7 @@ */ import type * as React from 'react'; -import {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; +import {HostComponent} from '../../../types/public/ReactNativeTypes'; import {EmitterSubscription} from '../../vendor/emitter/EventEmitter'; type AccessibilityChangeEventName = diff --git a/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts b/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts index 3ba3d00e44..f1a4b246dd 100644 --- a/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +++ b/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts @@ -8,8 +8,8 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {Constructor} from '../../../types/private/Utilities'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet'; import {ViewStyle} from '../../StyleSheet/StyleSheetTypes'; import {LayoutChangeEvent} from '../../Types/CoreEventTypes'; diff --git a/Libraries/Components/DatePicker/DatePickerIOS.d.ts b/Libraries/Components/DatePicker/DatePickerIOS.d.ts index 3db5f3feb3..17c60b7516 100644 --- a/Libraries/Components/DatePicker/DatePickerIOS.d.ts +++ b/Libraries/Components/DatePicker/DatePickerIOS.d.ts @@ -8,8 +8,8 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {Constructor} from '../../../types/private/Utilities'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ViewProps} from '../View/ViewPropTypes'; export interface DatePickerIOSProps extends ViewProps { diff --git a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts index baaf38151e..9f90951c88 100644 --- a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +++ b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts @@ -8,8 +8,8 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {Constructor} from '../../../types/private/Utilities'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ColorValue} from '../../StyleSheet/StyleSheet'; import { NativeSyntheticEvent, diff --git a/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts b/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts index 0fa8783c03..42bff4a519 100644 --- a/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +++ b/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts @@ -8,7 +8,8 @@ */ import type * as React from 'react'; -import {Constructor, TimerMixin} from 'Utilities'; +import {Constructor} from '../../../types/private/Utilities'; +import {TimerMixin} from '../../../types/private/TimerMixin'; import {StyleProp} from '../../StyleSheet/StyleSheet'; import {ViewStyle} from '../../StyleSheet/StyleSheetTypes'; import {ViewProps} from '../View/ViewPropTypes'; diff --git a/Libraries/Components/Pressable/Pressable.d.ts b/Libraries/Components/Pressable/Pressable.d.ts index 4fe0a82e34..640e412611 100644 --- a/Libraries/Components/Pressable/Pressable.d.ts +++ b/Libraries/Components/Pressable/Pressable.d.ts @@ -8,7 +8,7 @@ */ import type * as React from 'react'; -import {Insets} from 'Utilities'; +import {Insets} from '../../../types/public/Insets'; import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet'; import {ViewStyle} from '../../StyleSheet/StyleSheetTypes'; import { diff --git a/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts b/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts index d1d5a930a1..a368adfb07 100644 --- a/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +++ b/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts @@ -8,8 +8,8 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {Constructor} from '../../../types/private/Utilities'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ColorValue} from '../../StyleSheet/StyleSheet'; import {ViewProps} from '../View/ViewPropTypes'; diff --git a/Libraries/Components/ProgressViewIOS/ProgressViewIOS.d.ts b/Libraries/Components/ProgressViewIOS/ProgressViewIOS.d.ts index 5194662941..1f38df718c 100644 --- a/Libraries/Components/ProgressViewIOS/ProgressViewIOS.d.ts +++ b/Libraries/Components/ProgressViewIOS/ProgressViewIOS.d.ts @@ -8,9 +8,9 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; +import {Constructor} from '../../../types/private/Utilities'; import {ImageURISource} from '../../Image/ImageSource'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ColorValue} from '../../StyleSheet/StyleSheet'; import {ViewProps} from '../View/ViewPropTypes'; diff --git a/Libraries/Components/RefreshControl/RefreshControl.d.ts b/Libraries/Components/RefreshControl/RefreshControl.d.ts index 2af44a819e..81eba749c9 100644 --- a/Libraries/Components/RefreshControl/RefreshControl.d.ts +++ b/Libraries/Components/RefreshControl/RefreshControl.d.ts @@ -8,8 +8,8 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {Constructor} from '../../../types/private/Utilities'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ColorValue} from '../../StyleSheet/StyleSheet'; import {ViewProps} from '../View/ViewPropTypes'; diff --git a/Libraries/Components/SafeAreaView/SafeAreaView.d.ts b/Libraries/Components/SafeAreaView/SafeAreaView.d.ts index 1386556277..f96a1a5075 100644 --- a/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +++ b/Libraries/Components/SafeAreaView/SafeAreaView.d.ts @@ -8,8 +8,8 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {Constructor} from '../../../types/private/Utilities'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ViewProps} from '../View/ViewPropTypes'; /** diff --git a/Libraries/Components/ScrollView/ScrollView.d.ts b/Libraries/Components/ScrollView/ScrollView.d.ts index 1e0d6f02b5..0803499a44 100644 --- a/Libraries/Components/ScrollView/ScrollView.d.ts +++ b/Libraries/Components/ScrollView/ScrollView.d.ts @@ -8,7 +8,8 @@ */ import type * as React from 'react'; -import {Constructor, Insets} from 'Utilities'; +import {Constructor} from '../../../types/private/Utilities'; +import {Insets} from '../../../types/public/Insets'; import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet'; import {ViewStyle} from '../../StyleSheet/StyleSheetTypes'; import { diff --git a/Libraries/Components/Slider/Slider.d.ts b/Libraries/Components/Slider/Slider.d.ts index befb08daa3..33f26d0694 100644 --- a/Libraries/Components/Slider/Slider.d.ts +++ b/Libraries/Components/Slider/Slider.d.ts @@ -8,9 +8,9 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; +import {Constructor} from '../../../types/private/Utilities'; import {ImageURISource} from '../../Image/ImageSource'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet'; import {ViewStyle} from '../../StyleSheet/StyleSheetTypes'; import {ViewProps} from '../View/ViewPropTypes'; diff --git a/Libraries/Components/Switch/Switch.d.ts b/Libraries/Components/Switch/Switch.d.ts index ea52709c54..64a735d664 100644 --- a/Libraries/Components/Switch/Switch.d.ts +++ b/Libraries/Components/Switch/Switch.d.ts @@ -8,8 +8,8 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {Constructor} from '../../../types/private/Utilities'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet'; import {ViewStyle} from '../../StyleSheet/StyleSheetTypes'; import {ViewProps} from '../View/ViewPropTypes'; diff --git a/Libraries/Components/TextInput/TextInput.d.ts b/Libraries/Components/TextInput/TextInput.d.ts index 3ad310bd8c..12cfec2987 100644 --- a/Libraries/Components/TextInput/TextInput.d.ts +++ b/Libraries/Components/TextInput/TextInput.d.ts @@ -8,11 +8,12 @@ */ import type * as React from 'react'; -import {Constructor, TimerMixin} from 'Utilities'; +import {Constructor} from '../../../types/private/Utilities'; +import {TimerMixin} from '../../../types/private/TimerMixin'; import { HostComponent, NativeMethods, -} from '../../Renderer/shims/ReactNativeTypes'; +} from '../../../types/public/ReactNativeTypes'; import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet'; import {TextStyle} from '../../StyleSheet/StyleSheetTypes'; import { diff --git a/Libraries/Components/Touchable/Touchable.d.ts b/Libraries/Components/Touchable/Touchable.d.ts index 34bce2c464..6915dd2792 100644 --- a/Libraries/Components/Touchable/Touchable.d.ts +++ b/Libraries/Components/Touchable/Touchable.d.ts @@ -8,7 +8,7 @@ */ import type * as React from 'react'; -import {Insets} from 'Utilities'; +import {Insets} from '../../../types/public/Insets'; import {GestureResponderEvent} from '../../Types/CoreEventTypes'; /** diff --git a/Libraries/Components/Touchable/TouchableHighlight.d.ts b/Libraries/Components/Touchable/TouchableHighlight.d.ts index 39a487e066..b9faa3a879 100644 --- a/Libraries/Components/Touchable/TouchableHighlight.d.ts +++ b/Libraries/Components/Touchable/TouchableHighlight.d.ts @@ -8,8 +8,9 @@ */ import type * as React from 'react'; -import {Constructor, TimerMixin} from 'Utilities'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {Constructor} from '../../../types/private/Utilities'; +import {TimerMixin} from '../../../types/private/TimerMixin'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet'; import {ViewStyle} from '../../StyleSheet/StyleSheetTypes'; import {TouchableMixin} from './Touchable'; diff --git a/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts b/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts index ebf7d66d2a..9de3953b31 100644 --- a/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +++ b/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts @@ -8,7 +8,7 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; +import {Constructor} from '../../../types/private/Utilities'; import {ColorValue} from '../../StyleSheet/StyleSheet'; import {TouchableMixin} from './Touchable'; diff --git a/Libraries/Components/Touchable/TouchableOpacity.d.ts b/Libraries/Components/Touchable/TouchableOpacity.d.ts index fccbd39330..37c4ce6df4 100644 --- a/Libraries/Components/Touchable/TouchableOpacity.d.ts +++ b/Libraries/Components/Touchable/TouchableOpacity.d.ts @@ -8,8 +8,9 @@ */ import type * as React from 'react'; -import {Constructor, TimerMixin} from 'Utilities'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {Constructor} from '../../../types/private/Utilities'; +import {TimerMixin} from '../../../types/private/TimerMixin'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; import {TVParallaxProperties} from '../View/ViewPropTypes'; import {TouchableMixin} from './Touchable'; import {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback'; diff --git a/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts b/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts index 23c08df60d..a6f3316d36 100644 --- a/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +++ b/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts @@ -8,7 +8,9 @@ */ import type * as React from 'react'; -import {Constructor, Insets, TimerMixin} from 'Utilities'; +import {Constructor} from '../../../types/private/Utilities'; +import {TimerMixin} from '../../../types/private/TimerMixin'; +import {Insets} from '../../../types/public/Insets'; import {StyleProp} from '../../StyleSheet/StyleSheet'; import {ViewStyle} from '../../StyleSheet/StyleSheetTypes'; import { diff --git a/Libraries/Components/View/View.d.ts b/Libraries/Components/View/View.d.ts index 4c3528e270..5fbb52928e 100644 --- a/Libraries/Components/View/View.d.ts +++ b/Libraries/Components/View/View.d.ts @@ -8,9 +8,9 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; +import {Constructor} from '../../../types/private/Utilities'; import {ViewProps} from './ViewPropTypes'; -import {NativeMethods} from '../../Renderer/shims/ReactNativeTypes'; +import {NativeMethods} from '../../../types/public/ReactNativeTypes'; /** * The most fundamental component for building UI, View is a container that supports layout with flexbox, style, some touch handling, diff --git a/Libraries/Components/View/ViewPropTypes.d.ts b/Libraries/Components/View/ViewPropTypes.d.ts index 5a7b24e21c..b7da46fe4b 100644 --- a/Libraries/Components/View/ViewPropTypes.d.ts +++ b/Libraries/Components/View/ViewPropTypes.d.ts @@ -8,8 +8,8 @@ */ import type * as React from 'react'; -import {Insets} from '../../../types/Utilities'; -import {GestureResponderHandlers} from '../../Renderer/implementations/ReactNativeRenderer'; +import {Insets} from '../../../types/public/Insets'; +import {GestureResponderHandlers} from '../../../types/public/ReactNativeRenderer'; import {StyleProp} from '../../StyleSheet/StyleSheet'; import {ViewStyle} from '../../StyleSheet/StyleSheetTypes'; import {LayoutChangeEvent, PointerEvents} from '../../Types/CoreEventTypes'; diff --git a/Libraries/Image/Image.d.ts b/Libraries/Image/Image.d.ts index 21c873844a..dd2c089e75 100644 --- a/Libraries/Image/Image.d.ts +++ b/Libraries/Image/Image.d.ts @@ -8,9 +8,10 @@ */ import * as React from 'react'; -import {Constructor, Insets} from 'Utilities'; +import {Constructor} from '../../types/private/Utilities'; import {AccessibilityProps} from '../Components/View/ViewAccessibility'; -import {NativeMethods} from '../Renderer/shims/ReactNativeTypes'; +import {Insets} from '../../types/public/Insets'; +import {NativeMethods} from '../../types/public/ReactNativeTypes'; import {StyleProp} from '../StyleSheet/StyleSheet'; import {ImageStyle, ViewStyle} from '../StyleSheet/StyleSheetTypes'; import {LayoutChangeEvent, NativeSyntheticEvent} from '../Types/CoreEventTypes'; diff --git a/Libraries/Interaction/PanResponder.d.ts b/Libraries/Interaction/PanResponder.d.ts index 0cbb93cd10..8a2d4f2a0e 100644 --- a/Libraries/Interaction/PanResponder.d.ts +++ b/Libraries/Interaction/PanResponder.d.ts @@ -7,7 +7,7 @@ * @format */ -import {GestureResponderHandlers} from '../Renderer/implementations/ReactNativeRenderer'; +import {GestureResponderHandlers} from '../../types/public/ReactNativeRenderer'; import {GestureResponderEvent} from '../Types/CoreEventTypes'; export interface PanResponderGestureState { diff --git a/Libraries/ReactNative/UIManager.d.ts b/Libraries/ReactNative/UIManager.d.ts index b975a79fad..1f0b346802 100644 --- a/Libraries/ReactNative/UIManager.d.ts +++ b/Libraries/ReactNative/UIManager.d.ts @@ -12,7 +12,7 @@ import { MeasureInWindowOnSuccessCallback, MeasureLayoutOnSuccessCallback, MeasureOnSuccessCallback, -} from '../Renderer/shims/ReactNativeTypes'; +} from '../../types/public/ReactNativeTypes'; export interface UIManagerStatic { /** diff --git a/Libraries/ReactNative/requireNativeComponent.d.ts b/Libraries/ReactNative/requireNativeComponent.d.ts index b3f1169687..935762a3e2 100644 --- a/Libraries/ReactNative/requireNativeComponent.d.ts +++ b/Libraries/ReactNative/requireNativeComponent.d.ts @@ -7,7 +7,7 @@ * @format */ -import {HostComponent} from '../Renderer/shims/ReactNativeTypes'; +import {HostComponent} from '../../types/public//ReactNativeTypes'; /** * Creates values that can be used like React components which represent native diff --git a/Libraries/Text/Text.d.ts b/Libraries/Text/Text.d.ts index 715123576a..e752148a5d 100644 --- a/Libraries/Text/Text.d.ts +++ b/Libraries/Text/Text.d.ts @@ -8,9 +8,9 @@ */ import type * as React from 'react'; -import {Constructor} from 'Utilities'; +import {Constructor} from '../../types/private/Utilities'; import {AccessibilityProps} from '../Components/View/ViewAccessibility'; -import {NativeMethods} from '../Renderer/shims/ReactNativeTypes'; +import {NativeMethods} from '../../types/public/ReactNativeTypes'; import {ColorValue, StyleProp} from '../StyleSheet/StyleSheet'; import {TextStyle} from '../StyleSheet/StyleSheetTypes'; import { diff --git a/Libraries/Types/CoreEventTypes.d.ts b/Libraries/Types/CoreEventTypes.d.ts index 778a8998f3..7aff083b07 100644 --- a/Libraries/Types/CoreEventTypes.d.ts +++ b/Libraries/Types/CoreEventTypes.d.ts @@ -9,7 +9,7 @@ import type * as React from 'react'; import {NodeHandle} from '../ReactNative/RendererProxy'; -import {HostComponent} from '../Renderer/shims/ReactNativeTypes'; +import {HostComponent} from '../../types/public/ReactNativeTypes'; export interface LayoutRectangle { x: number; diff --git a/types/index.d.ts b/types/index.d.ts index fe2e5b056b..542f22e591 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -65,12 +65,11 @@ // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// export * from '../Libraries/ActionSheetIOS/ActionSheetIOS'; export * from '../Libraries/Alert/Alert'; @@ -131,8 +130,6 @@ export * from '../Libraries/ReactNative/I18nManager'; export * from '../Libraries/ReactNative/RendererProxy'; export * from '../Libraries/ReactNative/UIManager'; export * from '../Libraries/ReactNative/requireNativeComponent'; -export * from '../Libraries/Renderer/implementations/ReactNativeRenderer'; -export * from '../Libraries/Renderer/shims/ReactNativeTypes'; export * from '../Libraries/Settings/Settings'; export * from '../Libraries/Share/Share'; export * from '../Libraries/StyleSheet/PlatformColorValueTypesIOS'; @@ -155,6 +152,11 @@ export * from '../Libraries/YellowBox/YellowBoxDeprecated'; export * from '../Libraries/vendor/core/ErrorUtils'; export * from '../Libraries/vendor/emitter/EventEmitter'; +export * from './public/DeprecatedPropertiesAlias'; +export * from './public/Insets'; +export * from './public/ReactNativeRenderer'; +export * from './public/ReactNativeTypes'; + import type {ErrorUtils} from '../Libraries/vendor/core/ErrorUtils'; declare global { diff --git a/types/legacy-properties.d.ts b/types/legacy-properties.d.ts deleted file mode 100644 index 6e7a00966b..0000000000 --- a/types/legacy-properties.d.ts +++ /dev/null @@ -1,208 +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. - * - * @format - */ - -import { - TextProps, - TextPropsIOS, - TextPropsAndroid, - AccessibilityProps, - AccessibilityPropsIOS, - AccessibilityPropsAndroid, - TextInputProps, - TextInputIOSProps, - TextInputAndroidProps, - ViewProps, - ViewPropsIOS, - ViewPropsAndroid, - ScrollViewProps, - ScrollViewPropsIOS, - ScrollViewPropsAndroid, - InputAccessoryViewProps, - ActivityIndicatorProps, - ActivityIndicatorIOSProps, - DatePickerIOSProps, - DrawerLayoutAndroidProps, - ProgressBarAndroidProps, - ProgressViewIOSProps, - RefreshControlProps, - RefreshControlPropsIOS, - RefreshControlPropsAndroid, - SliderProps, - SliderPropsIOS, - SliderPropsAndroid, - ImageSourcePropType, - ImageProps, - ImagePropsIOS, - ImagePropsAndroid, - ImageBackgroundProps, - FlatListProps, - VirtualizedListProps, - SectionListProps, - ModalProps, - TouchableWithoutFeedbackProps, - TouchableHighlightProps, - TouchableOpacityProps, - TouchableNativeFeedbackProps, - ButtonProps, - StatusBarProps, - StatusBarPropsIOS, - StatusBarPropsAndroid, - SwitchProps, - SwitchPropsIOS, -} from 'react-native'; - -declare module 'react-native' { - /* - * Previously, props interfaces where named *Properties - * They have been renamed to *Props to match React Native documentation - * The following lines ensure compatibility with *Properties and should be removed in the future - */ - - /** @deprecated Use TextProps */ - export type TextProperties = TextProps; - - /** @deprecated Use TextPropsIOS */ - export type TextPropertiesIOS = TextPropsIOS; - - /** @deprecated Use TextPropsAndroid */ - export type TextPropertiesAndroid = TextPropsAndroid; - - /** @deprecated Use AccessibilityProps */ - export type AccessibilityProperties = AccessibilityProps; - - /** @deprecated Use AccessibilityPropsIOS */ - export type AccessibilityPropertiesIOS = AccessibilityPropsIOS; - - /** @deprecated Use AccessibilityPropsAndroid */ - export type AccessibilityPropertiesAndroid = AccessibilityPropsAndroid; - - /** @deprecated Use TextInputProps */ - export type TextInputProperties = TextInputProps; - - /** @deprecated Use TextInputIOSProps */ - export type TextInputIOSProperties = TextInputIOSProps; - - /** @deprecated Use TextInputAndroidProps */ - export type TextInputAndroidProperties = TextInputAndroidProps; - - /** @deprecated Use ViewProps */ - export type ViewProperties = ViewProps; - - /** @deprecated Use ViewPropsIOS */ - export type ViewPropertiesIOS = ViewPropsIOS; - - /** @deprecated Use ViewPropsAndroid */ - export type ViewPropertiesAndroid = ViewPropsAndroid; - - /** @deprecated Use ScrollViewProps */ - export type ScrollViewProperties = ScrollViewProps; - - /** @deprecated Use ScrollViewPropsIOS */ - export type ScrollViewPropertiesIOS = ScrollViewPropsIOS; - - /** @deprecated Use ScrollViewPropsAndroid */ - export type ScrollViewPropertiesAndroid = ScrollViewPropsAndroid; - - /** @deprecated Use InputAccessoryViewProps */ - export type InputAccessoryViewProperties = InputAccessoryViewProps; - - /** @deprecated Use ActivityIndicatorProps */ - export type ActivityIndicatorProperties = ActivityIndicatorProps; - - /** @deprecated Use ActivityIndicatorIOSProps */ - export type ActivityIndicatorIOSProperties = ActivityIndicatorIOSProps; - - /** @deprecated Use DatePickerIOSProps */ - export type DatePickerIOSProperties = DatePickerIOSProps; - - /** @deprecated Use DrawerLayoutAndroidProps */ - export type DrawerLayoutAndroidProperties = DrawerLayoutAndroidProps; - - /** @deprecated Use ProgressBarAndroidProps */ - export type ProgressBarAndroidProperties = ProgressBarAndroidProps; - - /** @deprecated Use ProgressViewIOSProps */ - export type ProgressViewIOSProperties = ProgressViewIOSProps; - - /** @deprecated Use RefreshControlProps */ - export type RefreshControlProperties = RefreshControlProps; - - /** @deprecated Use RefreshControlPropsIOS */ - export type RefreshControlPropertiesIOS = RefreshControlPropsIOS; - - /** @deprecated Use RefreshControlPropsAndroid */ - export type RefreshControlPropertiesAndroid = RefreshControlPropsAndroid; - - /** @deprecated Use SliderProps */ - export type SliderProperties = SliderProps; - - /** @deprecated Use SliderPropsIOS */ - export type SliderPropertiesIOS = SliderPropsIOS; - - /** @deprecated Use SliderPropsAndroid */ - export type SliderPropertiesAndroid = SliderPropsAndroid; - - /** @deprecated Use ImageSourcePropType */ - export type ImagePropertiesSourceOptions = ImageSourcePropType; - - /** @deprecated Use ImageProps */ - export type ImageProperties = ImageProps; - - /** @deprecated Use ImagePropsIOS */ - export type ImagePropertiesIOS = ImagePropsIOS; - - /** @deprecated Use ImagePropsAndroid */ - export type ImagePropertiesAndroid = ImagePropsAndroid; - - /** @deprecated Use ImageBackgroundProps */ - export type ImageBackgroundProperties = ImageBackgroundProps; - - /** @deprecated Use FlatListProps */ - export type FlatListProperties = FlatListProps; - - /** @deprecated Use VirtualizedListProps */ - export type VirtualizedListProperties = VirtualizedListProps; - - /** @deprecated Use SectionListProps */ - export type SectionListProperties = SectionListProps; - - /** @deprecated Use ModalProps */ - export type ModalProperties = ModalProps; - - /** @deprecated Use TouchableWithoutFeedbackProps */ - export type TouchableWithoutFeedbackProperties = - TouchableWithoutFeedbackProps; - - /** @deprecated Use TouchableHighlightProps */ - export type TouchableHighlightProperties = TouchableHighlightProps; - - /** @deprecated Use TouchableOpacityProps */ - export type TouchableOpacityProperties = TouchableOpacityProps; - - /** @deprecated Use TouchableNativeFeedbackProps */ - export type TouchableNativeFeedbackProperties = TouchableNativeFeedbackProps; - - /** @deprecated Use ButtonProps */ - export type ButtonProperties = ButtonProps; - - /** @deprecated Use StatusBarProps */ - export type StatusBarProperties = StatusBarProps; - - /** @deprecated Use StatusBarPropsIOS */ - export type StatusBarPropertiesIOS = StatusBarPropsIOS; - - /** @deprecated Use StatusBarPropsAndroid */ - export type StatusBarPropertiesAndroid = StatusBarPropsAndroid; - - /** @deprecated Use SwitchProps */ - export type SwitchProperties = SwitchProps; - - /** @deprecated Use SwitchPropsIOS */ - export type SwitchPropertiesIOS = SwitchPropsIOS; -} diff --git a/types/BatchedBridge.d.ts b/types/modules/BatchedBridge.d.ts similarity index 100% rename from types/BatchedBridge.d.ts rename to types/modules/BatchedBridge.d.ts diff --git a/types/Codegen.d.ts b/types/modules/Codegen.d.ts similarity index 100% rename from types/Codegen.d.ts rename to types/modules/Codegen.d.ts diff --git a/types/Devtools.d.ts b/types/modules/Devtools.d.ts similarity index 100% rename from types/Devtools.d.ts rename to types/modules/Devtools.d.ts diff --git a/types/LaunchScreen.d.ts b/types/modules/LaunchScreen.d.ts similarity index 100% rename from types/LaunchScreen.d.ts rename to types/modules/LaunchScreen.d.ts diff --git a/types/globals.d.ts b/types/modules/globals.d.ts similarity index 100% rename from types/globals.d.ts rename to types/modules/globals.d.ts diff --git a/types/Utilities.d.ts b/types/private/TimerMixin.d.ts similarity index 67% rename from types/Utilities.d.ts rename to types/private/TimerMixin.d.ts index 34b5234577..616183c79c 100644 --- a/types/Utilities.d.ts +++ b/types/private/TimerMixin.d.ts @@ -7,9 +7,6 @@ * @format */ -export type Omit = Pick>; -export type Constructor = new (...args: any[]) => T; - export interface TimerMixin { setTimeout: typeof setTimeout; clearTimeout: typeof clearTimeout; @@ -20,10 +17,3 @@ export interface TimerMixin { requestAnimationFrame: typeof requestAnimationFrame; cancelAnimationFrame: typeof cancelAnimationFrame; } - -export interface Insets { - top?: number | undefined; - left?: number | undefined; - bottom?: number | undefined; - right?: number | undefined; -} diff --git a/types/private/Utilities.d.ts b/types/private/Utilities.d.ts new file mode 100644 index 0000000000..563cac81a0 --- /dev/null +++ b/types/private/Utilities.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +export type Constructor = new (...args: any[]) => T; diff --git a/types/public/DeprecatedPropertiesAlias.d.ts b/types/public/DeprecatedPropertiesAlias.d.ts new file mode 100644 index 0000000000..b7b1aa6825 --- /dev/null +++ b/types/public/DeprecatedPropertiesAlias.d.ts @@ -0,0 +1,205 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import { + TextProps, + TextPropsIOS, + TextPropsAndroid, + AccessibilityProps, + AccessibilityPropsIOS, + AccessibilityPropsAndroid, + TextInputProps, + TextInputIOSProps, + TextInputAndroidProps, + ViewProps, + ViewPropsIOS, + ViewPropsAndroid, + ScrollViewProps, + ScrollViewPropsIOS, + ScrollViewPropsAndroid, + InputAccessoryViewProps, + ActivityIndicatorProps, + ActivityIndicatorIOSProps, + DatePickerIOSProps, + DrawerLayoutAndroidProps, + ProgressBarAndroidProps, + ProgressViewIOSProps, + RefreshControlProps, + RefreshControlPropsIOS, + RefreshControlPropsAndroid, + SliderProps, + SliderPropsIOS, + SliderPropsAndroid, + ImageSourcePropType, + ImageProps, + ImagePropsIOS, + ImagePropsAndroid, + ImageBackgroundProps, + FlatListProps, + VirtualizedListProps, + SectionListProps, + ModalProps, + TouchableWithoutFeedbackProps, + TouchableHighlightProps, + TouchableOpacityProps, + TouchableNativeFeedbackProps, + ButtonProps, + StatusBarProps, + StatusBarPropsIOS, + StatusBarPropsAndroid, + SwitchProps, + SwitchPropsIOS, +} from 'react-native'; + +/* + * Previously, props interfaces where named *Properties + * They have been renamed to *Props to match React Native documentation + * The following lines ensure compatibility with *Properties and should be removed in the future + */ + +/** @deprecated Use TextProps */ +export type TextProperties = TextProps; + +/** @deprecated Use TextPropsIOS */ +export type TextPropertiesIOS = TextPropsIOS; + +/** @deprecated Use TextPropsAndroid */ +export type TextPropertiesAndroid = TextPropsAndroid; + +/** @deprecated Use AccessibilityProps */ +export type AccessibilityProperties = AccessibilityProps; + +/** @deprecated Use AccessibilityPropsIOS */ +export type AccessibilityPropertiesIOS = AccessibilityPropsIOS; + +/** @deprecated Use AccessibilityPropsAndroid */ +export type AccessibilityPropertiesAndroid = AccessibilityPropsAndroid; + +/** @deprecated Use TextInputProps */ +export type TextInputProperties = TextInputProps; + +/** @deprecated Use TextInputIOSProps */ +export type TextInputIOSProperties = TextInputIOSProps; + +/** @deprecated Use TextInputAndroidProps */ +export type TextInputAndroidProperties = TextInputAndroidProps; + +/** @deprecated Use ViewProps */ +export type ViewProperties = ViewProps; + +/** @deprecated Use ViewPropsIOS */ +export type ViewPropertiesIOS = ViewPropsIOS; + +/** @deprecated Use ViewPropsAndroid */ +export type ViewPropertiesAndroid = ViewPropsAndroid; + +/** @deprecated Use ScrollViewProps */ +export type ScrollViewProperties = ScrollViewProps; + +/** @deprecated Use ScrollViewPropsIOS */ +export type ScrollViewPropertiesIOS = ScrollViewPropsIOS; + +/** @deprecated Use ScrollViewPropsAndroid */ +export type ScrollViewPropertiesAndroid = ScrollViewPropsAndroid; + +/** @deprecated Use InputAccessoryViewProps */ +export type InputAccessoryViewProperties = InputAccessoryViewProps; + +/** @deprecated Use ActivityIndicatorProps */ +export type ActivityIndicatorProperties = ActivityIndicatorProps; + +/** @deprecated Use ActivityIndicatorIOSProps */ +export type ActivityIndicatorIOSProperties = ActivityIndicatorIOSProps; + +/** @deprecated Use DatePickerIOSProps */ +export type DatePickerIOSProperties = DatePickerIOSProps; + +/** @deprecated Use DrawerLayoutAndroidProps */ +export type DrawerLayoutAndroidProperties = DrawerLayoutAndroidProps; + +/** @deprecated Use ProgressBarAndroidProps */ +export type ProgressBarAndroidProperties = ProgressBarAndroidProps; + +/** @deprecated Use ProgressViewIOSProps */ +export type ProgressViewIOSProperties = ProgressViewIOSProps; + +/** @deprecated Use RefreshControlProps */ +export type RefreshControlProperties = RefreshControlProps; + +/** @deprecated Use RefreshControlPropsIOS */ +export type RefreshControlPropertiesIOS = RefreshControlPropsIOS; + +/** @deprecated Use RefreshControlPropsAndroid */ +export type RefreshControlPropertiesAndroid = RefreshControlPropsAndroid; + +/** @deprecated Use SliderProps */ +export type SliderProperties = SliderProps; + +/** @deprecated Use SliderPropsIOS */ +export type SliderPropertiesIOS = SliderPropsIOS; + +/** @deprecated Use SliderPropsAndroid */ +export type SliderPropertiesAndroid = SliderPropsAndroid; + +/** @deprecated Use ImageSourcePropType */ +export type ImagePropertiesSourceOptions = ImageSourcePropType; + +/** @deprecated Use ImageProps */ +export type ImageProperties = ImageProps; + +/** @deprecated Use ImagePropsIOS */ +export type ImagePropertiesIOS = ImagePropsIOS; + +/** @deprecated Use ImagePropsAndroid */ +export type ImagePropertiesAndroid = ImagePropsAndroid; + +/** @deprecated Use ImageBackgroundProps */ +export type ImageBackgroundProperties = ImageBackgroundProps; + +/** @deprecated Use FlatListProps */ +export type FlatListProperties = FlatListProps; + +/** @deprecated Use VirtualizedListProps */ +export type VirtualizedListProperties = VirtualizedListProps; + +/** @deprecated Use SectionListProps */ +export type SectionListProperties = SectionListProps; + +/** @deprecated Use ModalProps */ +export type ModalProperties = ModalProps; + +/** @deprecated Use TouchableWithoutFeedbackProps */ +export type TouchableWithoutFeedbackProperties = TouchableWithoutFeedbackProps; + +/** @deprecated Use TouchableHighlightProps */ +export type TouchableHighlightProperties = TouchableHighlightProps; + +/** @deprecated Use TouchableOpacityProps */ +export type TouchableOpacityProperties = TouchableOpacityProps; + +/** @deprecated Use TouchableNativeFeedbackProps */ +export type TouchableNativeFeedbackProperties = TouchableNativeFeedbackProps; + +/** @deprecated Use ButtonProps */ +export type ButtonProperties = ButtonProps; + +/** @deprecated Use StatusBarProps */ +export type StatusBarProperties = StatusBarProps; + +/** @deprecated Use StatusBarPropsIOS */ +export type StatusBarPropertiesIOS = StatusBarPropsIOS; + +/** @deprecated Use StatusBarPropsAndroid */ +export type StatusBarPropertiesAndroid = StatusBarPropsAndroid; + +/** @deprecated Use SwitchProps */ +export type SwitchProperties = SwitchProps; + +/** @deprecated Use SwitchPropsIOS */ +export type SwitchPropertiesIOS = SwitchPropsIOS; diff --git a/types/public/Insets.d.ts b/types/public/Insets.d.ts new file mode 100644 index 0000000000..9f77753ecc --- /dev/null +++ b/types/public/Insets.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +export interface Insets { + top?: number | undefined; + left?: number | undefined; + bottom?: number | undefined; + right?: number | undefined; +} diff --git a/types/public/ReactNativeRenderer.d.ts b/types/public/ReactNativeRenderer.d.ts new file mode 100644 index 0000000000..542788c77b --- /dev/null +++ b/types/public/ReactNativeRenderer.d.ts @@ -0,0 +1,149 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import {GestureResponderEvent} from '../../Libraries/Types/CoreEventTypes'; + +/** + * Gesture recognition on mobile devices is much more complicated than web. + * A touch can go through several phases as the app determines what the user's intention is. + * For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. + * This can even change during the duration of a touch. There can also be multiple simultaneous touches. + * + * The touch responder system is needed to allow components to negotiate these touch interactions + * without any additional knowledge about their parent or child components. + * This system is implemented in ResponderEventPlugin.js, which contains further details and documentation. + * + * Best Practices + * Users can feel huge differences in the usability of web apps vs. native, and this is one of the big causes. + * Every action should have the following attributes: + * Feedback/highlighting- show the user what is handling their touch, and what will happen when they release the gesture + * Cancel-ability- when making an action, the user should be able to abort it mid-touch by dragging their finger away + * + * These features make users more comfortable while using an app, + * because it allows people to experiment and interact without fear of making mistakes. + * + * TouchableHighlight and Touchable* + * The responder system can be complicated to use. + * So we have provided an abstract Touchable implementation for things that should be "tappable". + * This uses the responder system and allows you to easily configure tap interactions declaratively. + * Use TouchableHighlight anywhere where you would use a button or link on web. + */ +export interface GestureResponderHandlers { + /** + * A view can become the touch responder by implementing the correct negotiation methods. + * There are two methods to ask the view if it wants to become responder: + */ + + /** + * Does this view want to become responder on the start of a touch? + */ + onStartShouldSetResponder?: + | ((event: GestureResponderEvent) => boolean) + | undefined; + + /** + * Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness? + */ + onMoveShouldSetResponder?: + | ((event: GestureResponderEvent) => boolean) + | undefined; + + /** + * If the View returns true and attempts to become the responder, one of the following will happen: + */ + + onResponderEnd?: ((event: GestureResponderEvent) => void) | undefined; + + /** + * The View is now responding for touch events. + * This is the time to highlight and show the user what is happening + */ + onResponderGrant?: ((event: GestureResponderEvent) => void) | undefined; + + /** + * Something else is the responder right now and will not release it + */ + onResponderReject?: ((event: GestureResponderEvent) => void) | undefined; + + /** + * If the view is responding, the following handlers can be called: + */ + + /** + * The user is moving their finger + */ + onResponderMove?: ((event: GestureResponderEvent) => void) | undefined; + + /** + * Fired at the end of the touch, ie "touchUp" + */ + onResponderRelease?: ((event: GestureResponderEvent) => void) | undefined; + + onResponderStart?: ((event: GestureResponderEvent) => void) | undefined; + + /** + * Something else wants to become responder. + * Should this view release the responder? Returning true allows release + */ + onResponderTerminationRequest?: + | ((event: GestureResponderEvent) => boolean) + | undefined; + + /** + * The responder has been taken from the View. + * Might be taken by other views after a call to onResponderTerminationRequest, + * or might be taken by the OS without asking (happens with control center/ notification center on iOS) + */ + onResponderTerminate?: ((event: GestureResponderEvent) => void) | undefined; + + /** + * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, + * where the deepest node is called first. + * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. + * This is desirable in most cases, because it makes sure all controls and buttons are usable. + * + * However, sometimes a parent will want to make sure that it becomes responder. + * This can be handled by using the capture phase. + * Before the responder system bubbles up from the deepest component, + * it will do a capture phase, firing on*ShouldSetResponderCapture. + * So if a parent View wants to prevent the child from becoming responder on a touch start, + * it should have a onStartShouldSetResponderCapture handler which returns true. + */ + onStartShouldSetResponderCapture?: + | ((event: GestureResponderEvent) => boolean) + | undefined; + + /** + * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, + * where the deepest node is called first. + * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. + * This is desirable in most cases, because it makes sure all controls and buttons are usable. + * + * However, sometimes a parent will want to make sure that it becomes responder. + * This can be handled by using the capture phase. + * Before the responder system bubbles up from the deepest component, + * it will do a capture phase, firing on*ShouldSetResponderCapture. + * So if a parent View wants to prevent the child from becoming responder on a touch start, + * it should have a onStartShouldSetResponderCapture handler which returns true. + */ + onMoveShouldSetResponderCapture?: + | ((event: GestureResponderEvent) => boolean) + | undefined; +} + +/** + * React Native also implements unstable_batchedUpdates + */ +export function unstable_batchedUpdates( + callback: (a: A, b: B) => any, + a: A, + b: B, +): void; +export function unstable_batchedUpdates(callback: (a: A) => any, a: A): void; +export function unstable_batchedUpdates(callback: () => any): void; diff --git a/types/public/ReactNativeTypes.d.ts b/types/public/ReactNativeTypes.d.ts new file mode 100644 index 0000000000..38e00e1cc9 --- /dev/null +++ b/types/public/ReactNativeTypes.d.ts @@ -0,0 +1,141 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import type * as React from 'react'; + +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; + +/** + * NativeMethods provides methods to access the underlying native component directly. + * This can be useful in cases when you want to focus a view or measure its on-screen dimensions, + * for example. + * The methods described here are available on most of the default components provided by React Native. + * Note, however, that they are not available on composite components that aren't directly backed by a + * native view. This will generally include most components that you define in your own app. + * For more information, see [Direct Manipulation](https://reactnative.dev/docs/direct-manipulation). + * @see https://github.com/facebook/react-native/blob/master/Libraries/Renderer/shims/ReactNativeTypes.js#L87 + */ +export interface NativeMethods { + /** + * Determines the location on screen, width, and height of the given view and + * returns the values via an async callback. If successful, the callback will + * be called with the following arguments: + * + * - x + * - y + * - width + * - height + * - pageX + * - pageY + * + * Note that these measurements are not available until after the rendering + * has been completed in native. If you need the measurements as soon as + * possible, consider using the [`onLayout` + * prop](docs/view.html#onlayout) instead. + */ + measure(callback: MeasureOnSuccessCallback): void; + + /** + * Determines the location of the given view in the window and returns the + * values via an async callback. If the React root view is embedded in + * another native view, this will give you the absolute coordinates. If + * successful, the callback will be called with the following + * arguments: + * + * - x + * - y + * - width + * - height + * + * Note that these measurements are not available until after the rendering + * has been completed in native. + */ + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; + + /** + * Like [`measure()`](#measure), but measures the view relative an ancestor, + * specified as `relativeToNativeComponentRef`. This means that the returned x, y + * are relative to the origin x, y of the ancestor view. + * _Can also be called with a relativeNativeNodeHandle but is deprecated._ + */ + measureLayout( + relativeToNativeComponentRef: HostComponent | number, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail: () => void /* currently unused */, + ): void; + + /** + * This function sends props straight to native. They will not participate in + * future diff process - this means that if you do not include them in the + * next render, they will remain active (see [Direct + * Manipulation](https://reactnative.dev/docs/direct-manipulation)). + */ + setNativeProps(nativeProps: object): void; + + /** + * Requests focus for the given input or view. The exact behavior triggered + * will depend on the platform and type of view. + */ + focus(): void; + + /** + * Removes focus from an input or view. This is the opposite of `focus()`. + */ + blur(): void; + + refs: { + [key: string]: React.Component; + }; +} + +/** + * @deprecated Use NativeMethods instead. + */ +export type NativeMethodsMixin = NativeMethods; +/** + * @deprecated Use NativeMethods instead. + */ +export type NativeMethodsMixinType = NativeMethods; + +/** + * Represents a native component, such as those returned from `requireNativeComponent`. + * + * @see https://github.com/facebook/react-native/blob/v0.62.0-rc.5/Libraries/Renderer/shims/ReactNativeTypes.js + * + * @todo This should eventually be defined as an AbstractComponent, but that + * should first be introduced in the React typings. + */ +export interface HostComponent

+ extends Pick< + React.ComponentClass

, + Exclude, 'new'> + > { + new (props: P, context?: any): React.Component

& Readonly; +} diff --git a/types/tsconfig.json b/types/tsconfig.json index 83a180a27f..7cabbef317 100644 --- a/types/tsconfig.json +++ b/types/tsconfig.json @@ -10,10 +10,6 @@ "jsx": "react", "noEmit": true, "forceConsistentCasingInFileNames": true, - - // If the library is an external module (uses `export`), this allows your test file to import "mylib" instead of "./index". - // If the library is global (cannot be imported via `import` or `require`), leave this out. - "baseUrl": ".", "paths": {"react-native": ["."]} } }