Fixes #20470 Map.addHandler takes a newable type as second param. (#22577)

This commit is contained in:
Askaholic
2018-01-03 10:47:40 -09:00
committed by Mohamed Hegazy
parent 634718d6f2
commit ddbf07cb69
2 changed files with 2 additions and 2 deletions

View File

@@ -1322,7 +1322,7 @@ export class Map extends Evented {
flyToBounds(bounds: LatLngBoundsExpression, options?: FitBoundsOptions): this;
// Other methods
addHandler(name: string, HandlerClass: () => Handler): this; // HandlerClass is actually a constructor function, is this the right way?
addHandler(name: string, HandlerClass: typeof Handler): this; // Alternatively, HandlerClass: new(map: Map) => Handler
remove(): this;
createPane(name: string, container?: HTMLElement): HTMLElement;
/**

View File

@@ -368,7 +368,7 @@ map = map
.flyToBounds(latLngBounds, fitBoundsOptions)
.flyToBounds(latLngBoundsLiteral)
.flyToBounds(latLngBoundsLiteral, fitBoundsOptions)
// addHandler
.addHandler('Hello World', L.Handler)
.remove()
.whenReady(() => {})
.whenReady(() => {}, {});