From a33d6c0accc8c9d9faa0c9279c63ebf91afb452f Mon Sep 17 00:00:00 2001 From: Dylan Chong Date: Thu, 6 Jul 2017 11:23:00 +1200 Subject: [PATCH] Fix mapbox-gl.Point constructor and missing x/y fields The actual type at runtime has a constructor with 2 parameters (that is now shown above), and there are actually 2 fields (x and y. --- types/mapbox-gl/index.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 680362fe82..8afe4c48f4 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -669,7 +669,10 @@ declare namespace mapboxgl { */ // Todo: Pull out class to seperate definition for Module "point-geometry" export class Point { - constructor(options?: Object); + x: number; + y: number; + + constructor(x: number, y: number); clone(): Point; @@ -707,7 +710,7 @@ declare namespace mapboxgl { angleWithSep(x: number, y: number): number; - convert(a: Array | Point): Point; + static convert(a: Array | Point): Point; } export class Marker {