From 63ec8ab8536ce8260458ecdbf3bc27ce19f3bb94 Mon Sep 17 00:00:00 2001 From: Eric Lin Date: Fri, 25 Sep 2020 21:33:11 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#48179=20[mapbox-gl?= =?UTF-8?q?]=20Add=20missing=20'idle'=20event=20by=20@retypepassword?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [mapbox-gl] Add missing 'idle' event * Update tests --- types/mapbox-gl/index.d.ts | 1 + types/mapbox-gl/mapbox-gl-tests.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 326455c182..8b39a53106 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -1764,6 +1764,7 @@ declare namespace mapboxgl { error: ErrorEvent; load: MapboxEvent; + idle: MapboxEvent; remove: MapboxEvent; render: MapboxEvent; resize: MapboxEvent; diff --git a/types/mapbox-gl/mapbox-gl-tests.ts b/types/mapbox-gl/mapbox-gl-tests.ts index ab639eb0c1..3d3fb7b520 100644 --- a/types/mapbox-gl/mapbox-gl-tests.ts +++ b/types/mapbox-gl/mapbox-gl-tests.ts @@ -897,6 +897,10 @@ expectType( expectType(ev.originalEvent); }), ); +// $ExpectType Map +map.on('idle', ev => { + ev; // $ExpectType MapboxEvent & EventData +}); expectType( map.on('remove', ev => { expectType(ev);