Skip to content

Commit

Permalink
update osm-api dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yle committed Jan 24, 2024
1 parent 189265b commit 500dc2a
Show file tree
Hide file tree
Showing 3 changed files with 511 additions and 790 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"diff": "^5.1.0",
"jsonc-parser": "^3.2.0",
"leaflet": "^1.9.4",
"osm-api": "^1.0.5",
"osm-api": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-leaflet": "^4.2.1",
Expand Down
23 changes: 7 additions & 16 deletions src/types/osmPatch.def.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import type { Feature, Geometry } from 'geojson';
import type { OsmFeatureType } from 'osm-api';
import type {
OsmPatch as _OsmPatch,
OsmPatchFeature as _OsmPatchFeature,
} from 'osm-api';

export type Tags = { [key: string]: string };
export type { Tags } from 'osm-api';

export type OsmPatchFeature = Feature<
Geometry,
Tags & {
__action?: 'edit' | 'move' | 'delete';
__members?: { type: OsmFeatureType; ref: number; role: string }[];
}
> & {
export type OsmPatchFeature = _OsmPatchFeature & {
/**
* temporarily added by this app, when we're creating features they don't
* have a nwrId yet, so we need a way to match features between the osmPatch
Expand All @@ -18,11 +14,6 @@ export type OsmPatchFeature = Feature<
osmChangeId?: string;
};

export type OsmPatch = {
type: 'FeatureCollection';
export type OsmPatch = Omit<_OsmPatch, 'features'> & {
features: OsmPatchFeature[];
__comment?: string;
size?: 'small' | 'medium' | 'large';
instructions?: string;
changesetTags?: Tags;
};
Loading

0 comments on commit 500dc2a

Please sign in to comment.