Improve typing

This commit is contained in:
Pieter Vander Vennet 2022-09-03 14:48:38 +02:00
parent 234129ad32
commit e653a76b69
2 changed files with 15 additions and 4 deletions

View file

@ -1,4 +1,9 @@
import {Feature, Geometry} from "@turf/turf";
export type RelationId = `relation/${number}`
export type WayId = `way/${number}`
export type NodeId = `node/${number}`
export type OsmId = NodeId | WayId | RelationId
export type OsmTags = Record<string, string> & {id: string}
export type OsmFeature = Feature<Geometry, OsmTags>