-
-
Notifications
You must be signed in to change notification settings - Fork 937
Expand file tree
/
Copy pathRNMBXShapeSourceNativeComponent.ts
More file actions
36 lines (32 loc) · 1.27 KB
/
RNMBXShapeSourceNativeComponent.ts
File metadata and controls
36 lines (32 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import type { HostComponent, ViewProps } from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import {
DirectEventHandler,
Double,
Int32,
// @ts-ignore - CI environment type resolution issue for CodegenTypes
} from 'react-native/Libraries/Types/CodegenTypes';
import type { UnsafeMixed } from './codegenUtils';
type OnMapboxShapeSourcePressEventType = { type: string; payload: string };
export interface NativeProps extends ViewProps {
id: UnsafeMixed<string>;
existing: UnsafeMixed<boolean>;
url: UnsafeMixed<string>;
shape: UnsafeMixed<string>;
cluster: UnsafeMixed<Int32>;
clusterRadius: UnsafeMixed<Double>;
clusterMaxZoomLevel: UnsafeMixed<Double>;
clusterProperties: UnsafeMixed<any>;
maxZoomLevel: UnsafeMixed<Double>;
minZoomLevel: UnsafeMixed<Double>;
buffer: UnsafeMixed<Double>;
tolerance: UnsafeMixed<Double>;
lineMetrics: UnsafeMixed<boolean>;
hasPressListener: UnsafeMixed<boolean>;
hitbox: UnsafeMixed<any>;
onMapboxShapeSourcePress: DirectEventHandler<OnMapboxShapeSourcePressEventType>;
}
// @ts-ignore-error - Codegen requires single cast but TypeScript prefers double cast
export default codegenNativeComponent<NativeProps>(
'RNMBXShapeSource',
) as HostComponent<NativeProps>;