Skip to content

Commit c4a6e6c

Browse files
authored
feat(types): add filter-input to HTMLElementTagNameMap
Adding `filter-input` to the global `HTMLElementTagNameMap` interface is the type-level equivalent of registering the tag in the global registry. Since it is now recognized as a globally-available element, it enables stronger types when using `<filter-input>` directly, or adding event listeners, etc.
1 parent d4dada4 commit c4a6e6c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ declare global {
167167
interface Window {
168168
FilterInputElement: typeof FilterInputElement
169169
}
170+
interface HTMLElementTagNameMap {
171+
'filter-input': FilterInputElement
172+
}
170173
}
171174

172175
if (!window.customElements.get('filter-input')) {

0 commit comments

Comments
 (0)