mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-27 12:21:19 +08:00
Update GeoJSON definition with generics
This commit is contained in:
1 parent
6766ed1d0f
commit
1d3dd1edee
2 files changed
+5
-5
No files matched your search
@@ -54,7 +54,7 @@ var featureCollection: GeoJSON.FeatureCollection = {
|
||||
}
|
||||
}
|
||||
|
||||
var feature: GeoJSON.Feature = {
|
||||
var feature: GeoJSON.Feature<GeoJSON.Polygon> = {
|
||||
type: "Feature",
|
||||
bbox: [-180.0, -90.0, 180.0, 90.0],
|
||||
geometry: {
|
||||
|
||||
Vendored
+4
-4
@@ -90,9 +90,9 @@ declare namespace GeoJSON {
|
||||
/***
|
||||
* http://geojson.org/geojson-spec.html#feature-objects
|
||||
*/
|
||||
export interface Feature extends GeoJsonObject
|
||||
export interface Feature<T extends GeometryObject> extends GeoJsonObject
|
||||
{
|
||||
geometry: GeometryObject;
|
||||
geometry: T;
|
||||
properties: any;
|
||||
id?: string;
|
||||
}
|
||||
@@ -100,9 +100,9 @@ declare namespace GeoJSON {
|
||||
/***
|
||||
* http://geojson.org/geojson-spec.html#feature-collection-objects
|
||||
*/
|
||||
export interface FeatureCollection extends GeoJsonObject
|
||||
export interface FeatureCollection<T extends GeometryObject> extends GeoJsonObject
|
||||
{
|
||||
features: Feature[];
|
||||
features: Feature<T>[];
|
||||
}
|
||||
|
||||
/***
|
||||
|
||||
Reference in new issue
Block a user