diff --git a/src/specs/RNMBXMapViewNativeComponent.ts b/src/specs/RNMBXMapViewNativeComponent.ts index 57d92e7c3..8903bf4f4 100644 --- a/src/specs/RNMBXMapViewNativeComponent.ts +++ b/src/specs/RNMBXMapViewNativeComponent.ts @@ -1,14 +1,8 @@ import type { HostComponent, ViewProps } from 'react-native'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import { - BubblingEventHandler, - DirectEventHandler, - Int32, - Double, - // @ts-ignore - CI environment type resolution issue for CodegenTypes -} from 'react-native/Libraries/Types/CodegenTypes'; +import { codegenNativeComponent } from 'react-native'; import type { Point, UnsafeMixed } from './codegenUtils'; +import type { CodegenTypes } from 'react-native'; // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp type OptionalProp = UnsafeMixed; @@ -44,7 +38,7 @@ export interface NativeProps extends ViewProps { compassEnabled?: OptionalProp; compassFadeWhenNorth?: OptionalProp; compassPosition?: UnsafeMixed; - compassViewPosition?: OptionalProp; + compassViewPosition?: OptionalProp; compassViewMargins?: OptionalProp; scaleBarEnabled?: OptionalProp; @@ -54,7 +48,7 @@ export interface NativeProps extends ViewProps { scrollEnabled?: OptionalProp; rotateEnabled?: OptionalProp; pitchEnabled?: OptionalProp; - maxPitch?: OptionalProp; + maxPitch?: OptionalProp; deselectAnnotationOnTap?: OptionalProp; @@ -76,13 +70,13 @@ export interface NativeProps extends ViewProps { // iOS only compassImage?: OptionalProp; - onPress?: BubblingEventHandler; - onLongPress?: DirectEventHandler; - onMapChange?: DirectEventHandler; - onCameraChanged?: DirectEventHandler; + onPress?: CodegenTypes.BubblingEventHandler; + onLongPress?: CodegenTypes.DirectEventHandler; + onMapChange?: CodegenTypes.DirectEventHandler; + onCameraChanged?: CodegenTypes.DirectEventHandler; mapViewImpl?: OptionalProp; - preferredFramesPerSecond?: OptionalProp; + preferredFramesPerSecond?: OptionalProp; } // @ts-ignore-error - Codegen requires single cast but TypeScript prefers double cast @@ -137,9 +131,9 @@ type OnMapChangeEventTypeActual = { export type NativeMapViewActual = HostComponent< Omit & { - onCameraChanged?: DirectEventHandler; - onLongPress?: DirectEventHandler; - onPress?: DirectEventHandler; - onMapChange?: DirectEventHandler; + onCameraChanged?: CodegenTypes.DirectEventHandler; + onLongPress?: CodegenTypes.DirectEventHandler; + onPress?: CodegenTypes.DirectEventHandler; + onMapChange?: CodegenTypes.DirectEventHandler; } >;