@types/leaflet enhance return types of L.Polyline.getLatLngs() to support nested arrays of LatLng (#24030)

* Update index.d.ts

enhanced possible types of the return value for nested arrays of Polyline or Polygon

* Update index.d.ts

changed "Definitions by" in header section
This commit is contained in:
Michael Auer
2018-04-11 20:59:47 +02:00
committed by Mohamed Hegazy
parent d22c027901
commit 21d3f1d7f9

View File

@@ -2,6 +2,7 @@
// Project: https://github.com/Leaflet/Leaflet
// Definitions by: Alejandro Sánchez <https://github.com/alejo90>
// Arne Schubert <https://github.com/atd-schubert>
// Michael Auer <https://github.com/mcauer>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -611,7 +612,7 @@ export interface PolylineOptions extends PathOptions {
export class Polyline<T extends geojson.GeometryObject = geojson.LineString | geojson.MultiLineString, P = any> extends Path {
constructor(latlngs: LatLngExpression[], options?: PolylineOptions);
toGeoJSON(): geojson.Feature<T, P>;
getLatLngs(): LatLng[];
getLatLngs(): LatLng[] | LatLng[][] | LatLng[][][];
setLatLngs(latlngs: LatLngExpression[]): this;
isEmpty(): boolean;
getCenter(): LatLng;