Smartrak / mapbox-gl-js-typescript

Typescript definition for mapbox-gl-js
17 stars 7 forks source link

error TS2314: Generic type 'Feature<T>' requires 1 type argument(s) #7

Open rhbarauna opened 8 years ago

rhbarauna commented 8 years ago

I'm getting this error at compilation time. .../typings/modules/mapbox-gl/index.d.ts(238,164): error TS2314: Generic type 'Feature' requires 1 type argument(s). .../typings/modules/mapbox-gl/index.d.ts(240,104): error TS2314: Generic type 'Feature' requires 1 type argument(s). .../typings/modules/mapbox-gl/index.d.ts(281,13): error TS2304: Cannot find name 'undefined'

ghost commented 8 years ago

@rhbarauna me too, have you made any progress with this issue?

danzel commented 8 years ago

What are those lines in your local file?

ghost commented 8 years ago

I'm also getting this error. It's these 2 lines:

    queryRenderedFeatures(pointOrBox?: Point | Array<number> | Array<Point> | Array<Array<number>>, params?: { layers?: Array<string>, filter?: Array<any> }): Array<GeoJSON.Feature>;

    querySourceFeatures(sourceID: string, params?: { sourceLayer?: string, filter?: Array<any> }): Array<GeoJSON.Feature>;
danzel commented 8 years ago

Try replace GeoJSON.Feature in those lines with GeoJSON.Feature<GeoJSON.GeometryObject>?