diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index fc78b68361..43b1b9b509 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -496,6 +496,10 @@ declare namespace mapboxgl { enable(): void; disable(): void; + + setZoomRate(zoomRate: number): void; + + setWheelZoomRate(wheelZoomRate: number): void; } /** diff --git a/types/mapbox-gl/mapbox-gl-tests.ts b/types/mapbox-gl/mapbox-gl-tests.ts index 875b0720d6..78d600f500 100644 --- a/types/mapbox-gl/mapbox-gl-tests.ts +++ b/types/mapbox-gl/mapbox-gl-tests.ts @@ -897,3 +897,9 @@ expectType([ ['concat', ['get', 'area'], 'foobar', { 'font-scale': 0.8 }] ]); expectType(['coalesce', ['get', 'property'], ['get', 'property']]); + +/* + * ScrollZoomHandler + */ +expectType(new mapboxgl.Map().scrollZoom.setZoomRate(1)); +expectType(new mapboxgl.Map().scrollZoom.setWheelZoomRate(1));