Skip to content

Commit 1683bfb

Browse files
committed
docs(types): improve type documentation links
1 parent 0ebfd30 commit 1683bfb

File tree

2 files changed

+135
-31
lines changed

2 files changed

+135
-31
lines changed

src/RNGoogleMapsPlusView.nitro.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ import type {
3838
* Platform differences remain unless explicitly aligned.
3939
*/
4040
export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
41+
/** Initial map configuration. See {@link RNInitialProps}. */
4142
initialProps?: RNInitialProps;
43+
44+
/** UI and gesture settings. See {@link RNMapUiSettings}. */
4245
uiSettings?: RNMapUiSettings;
4346

4447
/** Enables "My Location" blue dot. */

src/types.ts

Lines changed: 132 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ export type RNInitialProps = {
2424
*/
2525
liteMode?: boolean;
2626

27-
/** Initial camera configuration. */
27+
/**
28+
* Initial camera configuration.
29+
* See {@link RNCameraUpdate}.
30+
*/
2831
camera?: RNCameraUpdate;
2932

3033
/** Background color while tiles load. */
@@ -50,7 +53,7 @@ export type RNMapUiSettings = {
5053
*/
5154
mapToolbarEnabled?: boolean;
5255

53-
/** Enables the "My Location" button. */
56+
/** Enables the "My Location" button. */
5457
myLocationButtonEnabled?: boolean;
5558

5659
/** Enables rotation gestures. */
@@ -114,16 +117,25 @@ export type RNLatLng = {
114117

115118
/** Geographic bounds. */
116119
export type RNLatLngBounds = {
117-
/** Southwest corner. */
120+
/** Southwest corner.
121+
*
122+
* See {@link RNLatLng}.
123+
*/
118124
southwest: RNLatLng;
119125

120-
/** Northeast corner. */
126+
/** Northeast corner.
127+
*
128+
* See {@link RNLatLng}.
129+
*/
121130
northeast: RNLatLng;
122131
};
123132

124133
/** Snapshot configuration. */
125134
export type RNSnapshotOptions = {
126-
/** Output size. */
135+
/** Output size.
136+
*
137+
* See {@link RNSize}.
138+
*/
127139
size?: RNSize;
128140

129141
/** Image format. */
@@ -182,7 +194,10 @@ export type RNUserInterfaceStyle = 'light' | 'dark' | 'system';
182194

183195
/** Camera definition. */
184196
export type RNCamera = {
185-
/** Camera target coordinate. */
197+
/** Camera target coordinate.
198+
*
199+
* See {@link RNLatLng}.
200+
*/
186201
center: RNLatLng;
187202

188203
/** Zoom level. */
@@ -197,7 +212,10 @@ export type RNCamera = {
197212

198213
/** Partial camera update. */
199214
export type RNCameraUpdate = {
200-
/** Camera target coordinate. */
215+
/** Camera target coordinate.
216+
*
217+
* See {@link RNLatLng}.
218+
*/
201219
center?: RNLatLng;
202220

203221
/** Zoom level. */
@@ -212,19 +230,34 @@ export type RNCameraUpdate = {
212230

213231
/** Visible region. */
214232
export type RNRegion = {
215-
/** Near-left corner. */
233+
/** Near-left corner.
234+
*
235+
* See {@link RNLatLng}.
236+
*/
216237
nearLeft: RNLatLng;
217238

218-
/** Near-right corner. */
239+
/** Near-right corner.
240+
*
241+
* See {@link RNLatLng}.
242+
*/
219243
nearRight: RNLatLng;
220244

221-
/** Far-left corner. */
245+
/** Far-left corner.
246+
*
247+
* See {@link RNLatLng}.
248+
*/
222249
farLeft: RNLatLng;
223250

224-
/** Far-right corner. */
251+
/** Far-right corner.
252+
*
253+
* See {@link RNLatLng}.
254+
*/
225255
farRight: RNLatLng;
226256

227-
/** Bounding box. */
257+
/** Bounding box.
258+
*
259+
* See {@link RNLatLngBounds}.
260+
*/
228261
latLngBounds: RNLatLngBounds;
229262
};
230263

@@ -274,12 +307,17 @@ export type RNMarker = {
274307
/** Z-index used for rendering order. */
275308
zIndex?: number;
276309

277-
/** Marker coordinate. */
310+
/** Marker coordinate.
311+
*
312+
* See {@link RNLatLng}.
313+
*/
278314
coordinate: RNLatLng;
279315

280316
/**
281317
* Anchor point relative to the marker icon.
282318
* (0,0) = top-left, (1,1) = bottom-right.
319+
*
320+
* See {@link RNPosition}.
283321
*/
284322
anchor?: RNPosition;
285323

@@ -304,6 +342,8 @@ export type RNMarker = {
304342
/**
305343
* Info window anchor relative to the marker.
306344
* (0,0) = top-left, (1,1) = bottom-right.
345+
*
346+
* See {@link RNPosition}.
307347
*/
308348
infoWindowAnchor?: RNPosition;
309349

@@ -357,7 +397,10 @@ export type RNPolygon = {
357397
/** Enables polygon press events. */
358398
pressable?: boolean;
359399

360-
/** Polygon vertices. */
400+
/** Polygon vertices.
401+
*
402+
* See {@link RNLatLng}[].
403+
*/
361404
coordinates: RNLatLng[];
362405

363406
/** Fill color. */
@@ -376,7 +419,10 @@ export type RNPolygon = {
376419
*/
377420
strokeWidth?: number;
378421

379-
/** Polygon holes. */
422+
/** Polygon holes.
423+
*
424+
* See {@link RNPolygonHole}.
425+
*/
380426
holes?: RNPolygonHole[];
381427

382428
/** Draws geodesic edges. */
@@ -385,7 +431,10 @@ export type RNPolygon = {
385431

386432
/** Polygon hole definition. */
387433
export type RNPolygonHole = {
388-
/** Hole vertices. */
434+
/** Hole vertices.
435+
*
436+
* See {@link RNLatLng}[].
437+
*/
389438
coordinates: RNLatLng[];
390439
};
391440

@@ -400,7 +449,10 @@ export type RNPolyline = {
400449
/** Enables polyline press events. */
401450
pressable?: boolean;
402451

403-
/** Polyline vertices. */
452+
/** Polyline vertices.
453+
*
454+
* See {@link RNLatLng}[].
455+
*/
404456
coordinates: RNLatLng[];
405457

406458
/** Line cap style. */
@@ -437,7 +489,10 @@ export type RNCircle = {
437489
/** Z-index used for rendering order. */
438490
zIndex?: number;
439491

440-
/** Circle center. */
492+
/** Circle center.
493+
*
494+
* See {@link RNLatLng}.
495+
*/
441496
center: RNLatLng;
442497

443498
/** Radius in meters. */
@@ -471,7 +526,10 @@ export type RNHeatmap = {
471526
/** Z-index used for rendering order. */
472527
zIndex?: number;
473528

474-
/** Weighted heatmap points. */
529+
/** Weighted heatmap points.
530+
*
531+
* See {@link RNHeatmapPoint}.
532+
*/
475533
weightedData: RNHeatmapPoint[];
476534

477535
/** Radius used for each point. */
@@ -480,7 +538,10 @@ export type RNHeatmap = {
480538
/** Overall heatmap opacity. */
481539
opacity?: number;
482540

483-
/** Custom gradient configuration. */
541+
/** Gradient configuration.
542+
*
543+
* See {@link RNHeatmapGradient}.
544+
*/
484545
gradient?: RNHeatmapGradient;
485546
};
486547

@@ -546,7 +607,10 @@ export type RNIndoorBuilding = {
546607
/** Index of the default level. */
547608
defaultLevelIndex?: number;
548609

549-
/** Available indoor levels. */
610+
/** Available indoor levels.
611+
*
612+
* See {@link RNIndoorLevel}.
613+
*/
550614
levels: RNIndoorLevel[];
551615

552616
/** Indicates whether the building is underground. */
@@ -570,16 +634,27 @@ export type RNIndoorLevel = {
570634

571635
/** Location configuration. */
572636
export type RNLocationConfig = {
573-
/** Android-specific location configuration. */
637+
/**
638+
* Android-specific location configuration.
639+
*
640+
* See {@link RNAndroidLocationConfig}.
641+
*/
574642
android?: RNAndroidLocationConfig;
575643

576-
/** iOS-specific location configuration. */
644+
/**
645+
* iOS-specific location configuration.
646+
*
647+
* See {@link RNIOSLocationConfig}.
648+
*/
577649
ios?: RNIOSLocationConfig;
578650
};
579651

580652
/** Android location configuration. */
581653
export type RNAndroidLocationConfig = {
582-
/** Requested location priority. */
654+
/**
655+
* Requested location priority.
656+
* See {@link RNAndroidLocationPriority}.
657+
*/
583658
priority?: RNAndroidLocationPriority;
584659

585660
/** Desired update interval in milliseconds. */
@@ -603,13 +678,19 @@ export enum RNAndroidLocationPriority {
603678

604679
/** iOS location configuration. */
605680
export type RNIOSLocationConfig = {
606-
/** Desired accuracy level. */
681+
/**
682+
* Desired accuracy level.
683+
* See {@link RNIOSLocationAccuracy}.
684+
*/
607685
desiredAccuracy?: RNIOSLocationAccuracy;
608686

609687
/** Minimum distance in meters before a new update is delivered. */
610688
distanceFilterMeters?: number;
611689

612-
/** Activity type used to optimize location updates. */
690+
/**
691+
* Activity type used to optimize location updates.
692+
* See {@link RNIOSLocationActivityType}.
693+
*/
613694
activityType?: RNIOSLocationActivityType;
614695
};
615696

@@ -641,10 +722,18 @@ export enum RNIOSLocationActivityType {
641722

642723
/** Combined location permission result. */
643724
export type RNLocationPermissionResult = {
644-
/** Android permission result. */
725+
/**
726+
* Android permission result.
727+
*
728+
* See {@link RNAndroidLocationPermissionResult}.
729+
*/
645730
android?: RNAndroidLocationPermissionResult;
646731

647-
/** iOS permission result. */
732+
/**
733+
* iOS permission result.
734+
*
735+
* See {@link RNIOSPermissionResult}.
736+
*/
648737
ios?: RNIOSPermissionResult;
649738
};
650739

@@ -668,7 +757,11 @@ export enum RNIOSPermissionResult {
668757

669758
/** Location object. */
670759
export type RNLocation = {
671-
/** Center coordinate. */
760+
/**
761+
* Center coordinate.
762+
*
763+
* See {@link RNLatLng}.
764+
*/
672765
center: RNLatLng;
673766

674767
/** Altitude in meters. */
@@ -686,10 +779,18 @@ export type RNLocation = {
686779
/** Timestamp in milliseconds since Unix epoch. */
687780
time: number;
688781

689-
/** Android-only fields. */
782+
/**
783+
* Android-only location fields.
784+
*
785+
* See {@link RNLocationAndroid}.
786+
*/
690787
android?: RNLocationAndroid;
691788

692-
/** iOS-only fields. */
789+
/**
790+
* iOS-only location fields.
791+
*
792+
* See {@link RNLocationIOS}.
793+
*/
693794
ios?: RNLocationIOS;
694795
};
695796

0 commit comments

Comments
 (0)