From 44aa8e0937ff700c04124702232f5f80c2318b24 Mon Sep 17 00:00:00 2001 From: Triston Armstrong Date: Fri, 11 Oct 2024 01:58:35 -0400 Subject: [PATCH] chore(types.dom.ts): add missing template element property types --- packages/lib/src/types.dom.ts | 41 ++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/packages/lib/src/types.dom.ts b/packages/lib/src/types.dom.ts index 94bb147..1775bd9 100644 --- a/packages/lib/src/types.dom.ts +++ b/packages/lib/src/types.dom.ts @@ -590,7 +590,46 @@ interface HtmlElementAttributes { rowSpan?: string | number headers?: string } - template: {} + /** + * This serves as a mechanism for holding HTML fragments, which can either be used + * later via JavaScript or generated immediately into shadow DOM. + * @link [MDN example](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template#examples) + * + * This element includes the [global attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes). + */ + template: { + /** + * Creates a **shadow root** for the parent element. It is a declarative version of the `Element.attachShadow()` + * method and accepts the same enumerated values. + * @link [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template#shadowrootmode) + */ + shadowrootmode?: "open" | "closed" + /** + * Sets the value of the **clonable** property of a **ShadowRoot** created using this element to `true`. If set, a clone + * of the shadow host (the parent element of this `