diff --git a/src/components/animation/animation.ts b/src/components/animation/animation.ts index 75c91f30f..b5fc68130 100644 --- a/src/components/animation/animation.ts +++ b/src/components/animation/animation.ts @@ -64,7 +64,7 @@ export default class WaAnimation extends WebAwesomeElement { @property() fill: FillMode = 'auto'; /** The number of iterations to run before the animation completes. Defaults to `Infinity`, which loops. */ - @property({ type: Number }) iterations = Infinity; + @property({ type: Number }) iterations: number = Infinity; /** The offset at which to start the animation, usually between 0 (start) and 1 (end). */ @property({ attribute: 'iteration-start', type: Number }) iterationStart = 0; diff --git a/src/components/checkbox/checkbox.ts b/src/components/checkbox/checkbox.ts index 312a76093..3d279fe3e 100644 --- a/src/components/checkbox/checkbox.ts +++ b/src/components/checkbox/checkbox.ts @@ -88,7 +88,7 @@ export default class WaCheckbox extends WebAwesomeFormAssociatedElement { private _value: string | null = this.getAttribute('value') ?? null; /** The value of the checkbox, submitted as a name/value pair with form data. */ - get value() { + get value(): string | null { return this._value ?? 'on'; } @@ -110,10 +110,11 @@ export default class WaCheckbox extends WebAwesomeFormAssociatedElement { @property({ type: Boolean, reflect: true }) indeterminate = false; /** Draws the checkbox in a checked state. */ - @property({ type: Boolean, attribute: false }) checked = this.hasAttribute('checked'); + @property({ type: Boolean, attribute: false }) checked: boolean = this.hasAttribute('checked'); /** The default value of the form control. Primarily used for resetting the form control. */ - @property({ type: Boolean, reflect: true, attribute: 'checked' }) defaultChecked = this.hasAttribute('checked'); + @property({ type: Boolean, reflect: true, attribute: 'checked' }) defaultChecked: boolean = + this.hasAttribute('checked'); /** * By default, form controls are associated with the nearest containing `
` element. This attribute allows you diff --git a/src/components/range/range.ts b/src/components/range/range.ts index f58e3fd7a..83a88e638 100644 --- a/src/components/range/range.ts +++ b/src/components/range/range.ts @@ -68,10 +68,11 @@ export default class WaRange extends WebAwesomeFormAssociatedElement { @property() title = ''; // make reactive to pass through /** The name of the range, submitted as a name/value pair with form data. */ - @property() name = ''; + @property() name: string = ''; /** The default value of the form control. Primarily used for resetting the form control. */ - @property({ type: Number, attribute: 'value', reflect: true }) defaultValue = Number(this.getAttribute('value')) || 0; + @property({ type: Number, attribute: 'value', reflect: true }) defaultValue: number = + Number(this.getAttribute('value')) || 0; private _value: number | null = null; diff --git a/src/components/switch/switch.ts b/src/components/switch/switch.ts index 8e2d64025..4a36a83e9 100644 --- a/src/components/switch/switch.ts +++ b/src/components/switch/switch.ts @@ -71,7 +71,7 @@ export default class WaSwitch extends WebAwesomeFormAssociatedElement { private _value: string | null = null; /** The current value of the switch, submitted as a name/value pair with form data. */ - get value() { + get value(): string | null { if (this.valueHasChanged) { return this._value; } @@ -99,10 +99,11 @@ export default class WaSwitch extends WebAwesomeFormAssociatedElement { @property({ type: Boolean }) disabled = false; /** Draws the switch in a checked state. */ - @property({ type: Boolean, attribute: false }) checked = this.hasAttribute('checked'); + @property({ type: Boolean, attribute: false }) checked: boolean = this.hasAttribute('checked'); /** The default value of the form control. Primarily used for resetting the form control. */ - @property({ type: Boolean, attribute: 'checked', reflect: true }) defaultChecked = this.hasAttribute('checked'); + @property({ type: Boolean, attribute: 'checked', reflect: true }) defaultChecked: boolean = + this.hasAttribute('checked'); /** * By default, form controls are associated with the nearest containing `` element. This attribute allows you