import { GeoJSON } from 'geojson'; export type GeoJSONTypeSet = Set; export interface HintIssue { from: number; to: number; node?: Node; severity: 'error'; message: string; } export interface Ctx { issues: HintIssue[]; valid: Array; } export const GEOJSON_FEATURE_TYPE = new Set(['Feature']); export const GEOJSON_GEOMETRY_TYPES = new Set([ 'Point', 'MultiPoint', 'Polygon', 'MultiPolygon', 'LineString', 'MultiLineString', 'GeometryCollection', ]); export const GEOJSON_GEOMETRY_TYPES_EX_GEOMETRY_COLLECTION = new Set< GeoJSON['type'] >([ 'Point', 'MultiPoint', 'Polygon', 'MultiPolygon', 'LineString', 'MultiLineString', ]); export const GEOJSON_TYPES = new Set( Array.from(GEOJSON_GEOMETRY_TYPES).concat([ 'Feature', 'FeatureCollection', ]));