mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
[Leaflet] Correct DivIconOptions html type union (#36841)
* [Leaflet] correct DivIconOptions.html type union (https://leafletjs.com/reference-1.5.0.html#divicon-html) * Add test for commit 29b2f15 * Replace false option for DivIconOptions.html (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/36841#pullrequestreview-260962388)
This commit is contained in:
committed by
Andrew Branch
parent
f6ddc0feca
commit
ea15603c5b
Vendored
+1
-1
@@ -1512,7 +1512,7 @@ export namespace Icon {
|
||||
export function icon(options: IconOptions): Icon;
|
||||
|
||||
export interface DivIconOptions extends BaseIconOptions {
|
||||
html?: string | false;
|
||||
html?: string | HTMLElement | false;
|
||||
bgPos?: PointExpression;
|
||||
iconSize?: PointExpression;
|
||||
iconAnchor?: PointExpression;
|
||||
|
||||
@@ -482,7 +482,9 @@ class MyDivIcon extends L.DivIcon {
|
||||
}
|
||||
}
|
||||
|
||||
const divIcon = L.divIcon({ html: '' });
|
||||
const divIconHtmlAsString = L.divIcon({ html: '' });
|
||||
const divIconHtmlAsElement = L.divIcon({ html: htmlElement });
|
||||
const divIconHtmlAsFalse = L.divIcon({ html: false });
|
||||
let defaultIcon = new L.Icon.Default();
|
||||
defaultIcon = new L.Icon.Default({ imagePath: 'apath' });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user