Skip to content

Commit 949e8ee

Browse files
silversonicaxelAlessandro Rabitti
andauthored
🤖 Merge PR DefinitelyTyped#72803 Updated leaflet whenReady type by @silversonicaxel
Co-authored-by: Alessandro Rabitti <alessandro.rabitti@whiffle.nl>
1 parent 980710c commit 949e8ee

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

types/leaflet/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2923,7 +2923,7 @@ export class Map extends Evented {
29232923
getPane(pane: string | HTMLElement): HTMLElement | undefined;
29242924
getPanes(): { [name: string]: HTMLElement } & DefaultMapPanes;
29252925
getContainer(): HTMLElement;
2926-
whenReady(fn: () => void, context?: any): this;
2926+
whenReady(fn: (event: { target: Map }) => void, context?: any): this;
29272927

29282928
// Methods for getting map state
29292929
getCenter(): LatLng;

types/leaflet/leaflet-tests.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,8 @@ map = map
615615
.addHandler("Hello World", L.Handler)
616616
.remove()
617617
.whenReady(() => {})
618-
.whenReady(() => {}, {});
618+
.whenReady(() => {}, {})
619+
.whenReady(({ target: {} }) => {}, {});
619620

620621
const elementToDrag = document.createElement("div");
621622
const draggable = new L.Draggable(elementToDrag);

0 commit comments

Comments
 (0)