fix ts errors

This commit is contained in:
Cory LaViska
2024-12-17 10:44:40 -05:00
parent 45cb5598fc
commit 25ee6ef1ad

View File

@@ -226,6 +226,7 @@ export class WebAwesomeFormAssociatedElement
this.addEventListener('invalid', this.emitInvalid);
}
}
states: CustomStateSet;
connectedCallback() {
super.connectedCallback();
@@ -493,7 +494,6 @@ export class WebAwesomeFormAssociatedElement
// Custom states
addCustomState(state: string) {
try {
// @ts-expect-error CustomStateSet doesn't exist in TS yet.
(this.internals.states as Set<string>).add(state);
} catch (_) {
// Without this, test suite errors.
@@ -504,7 +504,6 @@ export class WebAwesomeFormAssociatedElement
deleteCustomState(state: string) {
try {
// @ts-expect-error CustomStateSet doesn't exist in TS yet.
(this.internals.states as Set<string>).delete(state);
} catch (_) {
// Without this, test suite errors.
@@ -531,7 +530,6 @@ export class WebAwesomeFormAssociatedElement
let bool = false;
try {
// @ts-expect-error CustomStateSet doesn't exist in TS yet.
bool = (this.internals.states as Set<string>).has(state);
} catch (_) {
// Without this, test suite errors.