diff --git a/leaflet/index.d.ts b/leaflet/index.d.ts index 71f7c1824a..334c8953a0 100644 --- a/leaflet/index.d.ts +++ b/leaflet/index.d.ts @@ -963,7 +963,7 @@ declare namespace L { position?: ControlPosition; } - export interface Control { + export class Control extends Class { getPosition(): ControlPosition; setPosition(position: ControlPosition): this; getContainer(): HTMLElement; diff --git a/leaflet/leaflet-tests.ts b/leaflet/leaflet-tests.ts index b36337aa6c..ec38b292cb 100644 --- a/leaflet/leaflet-tests.ts +++ b/leaflet/leaflet-tests.ts @@ -390,3 +390,10 @@ class MyDivIcon extends L.DivIcon { super(); } } + +let myControlClass = L.Control.extend({}); +let myControl = new myControlClass(); + +L.Control.include({}); +L.Control.mergeOptions({}); +L.Control.addInitHook(() => {});