From 93f2298510c46d4453e182bd244d07e46f818bd6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Sun, 3 Sep 2023 07:34:53 +0200 Subject: [PATCH] add isHTML flag to types (fixes #1266) --- svg.js.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/svg.js.d.ts b/svg.js.d.ts index e63c859..8a9133a 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -12,7 +12,11 @@ declare type CSSStyleName = Exclude< declare module '@svgdotjs/svg.js' { function SVG(): Svg - function SVG(selector: QuerySelector): Element + /** + * @param selectorOrHtml pass in a css selector or an html/svg string + * @param isHTML only used if first argument is an html string. Will treat the svg/html as html and not svg + */ + function SVG(selectorOrHtml: QuerySelector, isHTML?: boolean): Element function SVG(el: T): SVGTypeMapping function SVG(domElement: HTMLElement): Element -- 2.39.5