File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,9 @@ export class ElementInternals implements IElementInternals {
134
134
const id = ref . getAttribute ( 'id' ) ;
135
135
const hostRoot = ref . getRootNode ( ) as Element ;
136
136
if ( hostRoot && id ) {
137
- return hostRoot ? hostRoot . querySelectorAll ( `[for=${ id } ]` ) as unknown as LabelsList : [ ] ;
137
+ return hostRoot . querySelectorAll < HTMLLabelElement > ( `[for=${ id } ]` ) as unknown as LabelsList ;
138
138
}
139
- return [ ] ;
139
+ return [ ] as unknown as LabelsList ;
140
140
}
141
141
142
142
/** Will report the elements validity state */
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export interface IAom {
45
45
export interface IElementInternals extends IAom {
46
46
checkValidity : ( ) => boolean ;
47
47
form : HTMLFormElement ;
48
- labels : NodeListOf < HTMLLabelElement > | [ ] ;
48
+ labels : LabelsList ;
49
49
reportValidity : ( ) => boolean ;
50
50
setFormValue : ( value : string | FormData | null ) => void ;
51
51
setValidity : (
@@ -77,7 +77,7 @@ export interface ICustomElement extends HTMLElement {
77
77
disabled ?: boolean ;
78
78
}
79
79
80
- export type LabelsList = NodeListOf < HTMLLabelElement > | [ ] ;
80
+ export type LabelsList = NodeList & [ ] ;
81
81
82
82
declare global {
83
83
interface HTMLElement {
You can’t perform that action at this time.
0 commit comments