mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
fix: more appropriate interface name for OSM models
This commit is contained in:
@@ -33,7 +33,7 @@ osmtogeojson(xml, {
|
||||
uninterestingTags: {foo:true}
|
||||
});
|
||||
|
||||
let json: OsmJSON.Root = {
|
||||
let json: OsmJSON.OsmJSONObject = {
|
||||
elements: [
|
||||
{
|
||||
type: "node",
|
||||
|
||||
Vendored
+7
-7
@@ -5,8 +5,8 @@
|
||||
|
||||
declare module "osmtogeojson" {
|
||||
export interface OsmToGeoJSON {
|
||||
(data: Document|OsmJSON.Root, options?: Options): GeoJSON.GeoJSONObject;
|
||||
toGeojson(data: Document|OsmJSON.Root, options?: Options): GeoJSON.GeoJSONObject;
|
||||
(data: Document|OsmJSON.OsmJSONObject, options?: Options): GeoJSON.GeoJSONObject;
|
||||
toGeojson(data: Document|OsmJSON.OsmJSONObject, options?: Options): GeoJSON.GeoJSONObject;
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
@@ -54,11 +54,11 @@ declare module "osmtogeojson" {
|
||||
}
|
||||
|
||||
export namespace OsmJSON {
|
||||
export interface Root {
|
||||
export interface OsmJSONObject {
|
||||
elements: (Node|Way|Relationship)[];
|
||||
}
|
||||
|
||||
export interface OsmJSONObject {
|
||||
export interface Element {
|
||||
type: string;
|
||||
id: number;
|
||||
tags?: { [name: string]: string; }
|
||||
@@ -69,16 +69,16 @@ declare module "osmtogeojson" {
|
||||
uid?: number;
|
||||
}
|
||||
|
||||
export interface Node extends OsmJSONObject {
|
||||
export interface Node extends Element {
|
||||
lat: number;
|
||||
lon: number;
|
||||
}
|
||||
|
||||
export interface Way extends OsmJSONObject {
|
||||
export interface Way extends Element {
|
||||
nodes: number[];
|
||||
}
|
||||
|
||||
export interface Relationship extends OsmJSONObject {
|
||||
export interface Relationship extends Element {
|
||||
members: Member[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user