mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Geojson (#9702)
* Added Error to support stack * initial seneca.d.ts * Changed type of Position to be compatible with other packages such as turf
This commit is contained in:
@@ -72,6 +72,11 @@ var point: GeoJSON.Point = {
|
||||
coordinates: [100.0, 0.0]
|
||||
};
|
||||
|
||||
|
||||
// This type is commonly used in the turf package
|
||||
var pointCoordinates: number[] = point.coordinates
|
||||
|
||||
|
||||
var lineString: GeoJSON.LineString = {
|
||||
type: "LineString",
|
||||
coordinates: [ [100.0, 0.0], [101.0, 1.0] ]
|
||||
@@ -126,4 +131,4 @@ var geometryCollection: GeoJSON.GeometryCollection = {
|
||||
coordinates: [ [101.0, 0.0], [102.0, 1.0] ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
5
geojson/geojson.d.ts
vendored
5
geojson/geojson.d.ts
vendored
@@ -18,10 +18,7 @@ declare namespace GeoJSON {
|
||||
/***
|
||||
* http://geojson.org/geojson-spec.html#positions
|
||||
*/
|
||||
export interface Position
|
||||
{
|
||||
[index: number]: number;
|
||||
}
|
||||
export type Position = number[]
|
||||
|
||||
/***
|
||||
* http://geojson.org/geojson-spec.html#geometry-objects
|
||||
|
||||
Reference in New Issue
Block a user