mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
[@types/mapbox-gl] Add support for converting from lat/lon
This commit is contained in:
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Mapbox GL JS v0.49.0
|
||||
// Type definitions for Mapbox GL JS v0.51.0
|
||||
// Project: https://github.com/mapbox/mapbox-gl-js
|
||||
// Definitions by: Dominik Bruderer <https://github.com/dobrud>, Patrick Reames <https://github.com/patrickr>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -17,7 +17,7 @@ declare namespace mapboxgl {
|
||||
|
||||
export function setRTLTextPlugin(pluginURL: string, callback: (error: Error) => void): void;
|
||||
|
||||
type LngLatLike = LngLat | { lng: number; lat: number; } | [number, number];
|
||||
type LngLatLike = LngLat | { lng: number; lat: number; } | { lon: number; lat: number; } | [number, number];
|
||||
type LngLatBoundsLike = LngLatBounds | [LngLatLike, LngLatLike] | [number, number, number, number];
|
||||
type PointLike = Point | [number, number];
|
||||
type Expression = any[];
|
||||
|
||||
@@ -417,6 +417,7 @@ function expectType<T>(value: T) { /* let the compiler handle things */ }
|
||||
expectType<mapboxgl.LngLatLike>(new mapboxgl.LngLat(0, 0));
|
||||
expectType<mapboxgl.LngLatLike>([0, 0]);
|
||||
expectType<mapboxgl.LngLatLike>({ lng: 0, lat: 0 });
|
||||
expectType<mapboxgl.LngLatLike>({ lon: 0, lat: 0 });
|
||||
|
||||
/*
|
||||
* LngLat
|
||||
|
||||
Reference in New Issue
Block a user