Improve typing

This commit is contained in:
Pieter Vander Vennet 2022-08-24 02:22:06 +02:00
parent 1fbe033456
commit 4d783aae45
4 changed files with 19 additions and 8 deletions

View file

@ -1,4 +1,9 @@
import {Feature, Geometry} from "@turf/turf";
export type OsmTags = Record<string, string> & {id: string}
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: OsmId}
export type OsmFeature = Feature<Geometry, OsmTags>