mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
fix ts errors
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user