From 57064aef4d29eb4b4cc3a55785d5cd63bd69e472 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 3 Jan 2023 13:36:12 -0500 Subject: [PATCH] remove void --- src/components/radio-button/radio-button.ts | 2 +- src/components/radio/radio.ts | 2 +- src/components/tree-item/tree-item.ts | 4 ++-- src/internal/watch.ts | 5 +---- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/radio-button/radio-button.ts b/src/components/radio-button/radio-button.ts index 0acee6ee5..89d34bbb5 100644 --- a/src/components/radio-button/radio-button.ts +++ b/src/components/radio-button/radio-button.ts @@ -52,7 +52,7 @@ export default class SlRadioButton extends ShoelaceElement { /** Draws a pill-style radio button with rounded edges. */ @property({ type: Boolean, reflect: true }) pill = false; - connectedCallback(): void { + connectedCallback() { super.connectedCallback(); this.setAttribute('role', 'presentation'); } diff --git a/src/components/radio/radio.ts b/src/components/radio/radio.ts index f5c64806a..1ffb91d83 100644 --- a/src/components/radio/radio.ts +++ b/src/components/radio/radio.ts @@ -42,7 +42,7 @@ export default class SlRadio extends ShoelaceElement { /** Disables the radio. */ @property({ type: Boolean, reflect: true }) disabled = false; - connectedCallback(): void { + connectedCallback() { super.connectedCallback(); this.setInitialAttributes(); this.addEventListeners(); diff --git a/src/components/tree-item/tree-item.ts b/src/components/tree-item/tree-item.ts index af110eb81..0aacc1634 100644 --- a/src/components/tree-item/tree-item.ts +++ b/src/components/tree-item/tree-item.ts @@ -81,7 +81,7 @@ export default class SlTreeItem extends ShoelaceElement { @query('.tree-item__children') childrenContainer: HTMLDivElement; @query('.tree-item__expand-button slot') expandButtonSlot: HTMLSlotElement; - connectedCallback(): void { + connectedCallback() { super.connectedCallback(); this.setAttribute('role', 'treeitem'); @@ -201,7 +201,7 @@ export default class SlTreeItem extends ShoelaceElement { this.isLeaf = !this.lazy && this.getChildrenItems().length === 0; } - protected willUpdate(changedProperties: PropertyValueMap | Map): void { + protected willUpdate(changedProperties: PropertyValueMap | Map) { if (changedProperties.has('selected') && !changedProperties.has('indeterminate')) { this.indeterminate = false; } diff --git a/src/internal/watch.ts b/src/internal/watch.ts index 2cfb796cf..15c6fa50a 100644 --- a/src/internal/watch.ts +++ b/src/internal/watch.ts @@ -32,10 +32,7 @@ export function watch(propName: string, options?: WatchOptions) { waitUntilFirstUpdate: false, ...options }; - return ( - proto: ElemClass, - decoratedFnName: UpdateHandlerFunctionKeys - ): void => { + return (proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys) => { // @ts-expect-error -- update is a protected property const { update } = proto; if (propName in proto) {