From 1d3dd1edeef5751eb0415644d20ec1b52e44f19e Mon Sep 17 00:00:00 2001 From: Yukiya Nakagawa Date: Sat, 19 Mar 2016 23:36:02 +0900 Subject: [PATCH] Update GeoJSON definition with generics --- geojson/geojson-tests.ts | 2 +- geojson/geojson.d.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/geojson/geojson-tests.ts b/geojson/geojson-tests.ts index ed953520b..611db7d52 100644 --- a/geojson/geojson-tests.ts +++ b/geojson/geojson-tests.ts @@ -54,7 +54,7 @@ var featureCollection: GeoJSON.FeatureCollection = { } } -var feature: GeoJSON.Feature = { +var feature: GeoJSON.Feature = { type: "Feature", bbox: [-180.0, -90.0, 180.0, 90.0], geometry: { diff --git a/geojson/geojson.d.ts b/geojson/geojson.d.ts index f74778315..d77de1fe8 100644 --- a/geojson/geojson.d.ts +++ b/geojson/geojson.d.ts @@ -90,9 +90,9 @@ declare namespace GeoJSON { /*** * http://geojson.org/geojson-spec.html#feature-objects */ - export interface Feature extends GeoJsonObject + export interface Feature 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 extends GeoJsonObject { - features: Feature[]; + features: Feature[]; } /***