Skip to content

Commit 02e9dda

Browse files
committed
docs(geojson): types
1 parent badf47f commit 02e9dda

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

geojson/RegionCoverer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type * as geojson from 'geojson'
22
import { MAX_LEVEL } from '../s2/cellid_constants'
33
import { CellUnion } from '../s2/CellUnion'
4-
import * as geometry from './geometry'
4+
import { fromGeoJSON } from './geometry'
55
import { Polyline } from '../s2/Polyline'
66
import { Polygon } from '../s2/Polygon'
77
import type { Region } from '../s2/Region'
@@ -99,8 +99,8 @@ export class RegionCoverer {
9999
}
100100

101101
/** Returns a CellUnion that covers the given GeoJSON geometry and satisfies the various restrictions. */
102-
covering(geom: geojson.Geometry): CellUnion {
103-
const shape = geometry.fromGeoJSON(geom)
102+
covering(geometry: geojson.Geometry): CellUnion {
103+
const shape = fromGeoJSON(geometry)
104104
if (Array.isArray(shape)) return this.mutliMemberCovering(shape as Region[])
105105
return this.coverer.covering(shape)
106106
}

geojson/_index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
* Module geojson implements types and functions for working with GeoJSON.
33
* @module geojson
44
*/
5-
export type { Encodable, Decodable } from './geometry'
5+
export * as geojson from 'geojson'
6+
7+
export { Encodable, Decodable } from './geometry'
68
export { toGeoJSON, fromGeoJSON } from './geometry'
79

8-
export type { RegionCovererOptions } from './RegionCoverer'
10+
export { RegionCovererOptions } from './RegionCoverer'
911
export { RegionCoverer } from './RegionCoverer'

0 commit comments

Comments
 (0)