remove void

This commit is contained in:
Cory LaViska
2023-01-03 13:36:12 -05:00
parent cf200aa58a
commit 57064aef4d
4 changed files with 5 additions and 8 deletions

View File

@@ -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');
}

View File

@@ -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();

View File

@@ -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<SlTreeItem> | Map<PropertyKey, unknown>): void {
protected willUpdate(changedProperties: PropertyValueMap<SlTreeItem> | Map<PropertyKey, unknown>) {
if (changedProperties.has('selected') && !changedProperties.has('indeterminate')) {
this.indeterminate = false;
}

View File

@@ -32,10 +32,7 @@ export function watch(propName: string, options?: WatchOptions) {
waitUntilFirstUpdate: false,
...options
};
return <ElemClass extends LitElement>(
proto: ElemClass,
decoratedFnName: UpdateHandlerFunctionKeys<ElemClass>
): void => {
return <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys<ElemClass>) => {
// @ts-expect-error -- update is a protected property
const { update } = proto;
if (propName in proto) {