From d0acef3ecbb87165ea84878846da220ad94ea6ee Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Sat, 27 Oct 2018 18:01:07 -0500 Subject: [PATCH] Add return types --- src/panels/lovelace/elements/hui-icon-element.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/panels/lovelace/elements/hui-icon-element.ts b/src/panels/lovelace/elements/hui-icon-element.ts index 4cb714bb5c..00c291a0c2 100644 --- a/src/panels/lovelace/elements/hui-icon-element.ts +++ b/src/panels/lovelace/elements/hui-icon-element.ts @@ -8,6 +8,7 @@ import { longPress } from "../common/directives/long-press-directive"; import { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin"; import { LovelaceElement, LovelaceElementConfig } from "./types.js"; import { HomeAssistant } from "../../../types.js"; +import { TemplateResult } from "lit-html"; interface Config extends LovelaceElementConfig { icon: string; @@ -22,7 +23,7 @@ export class HuiIconElement extends hassLocalizeLitMixin(LitElement) return { hass: {}, _config: {} }; } - public setConfig(config: Config) { + public setConfig(config: Config): void { if (!config.icon) { throw Error("Invalid Configuration: 'icon' required"); } @@ -30,7 +31,7 @@ export class HuiIconElement extends hassLocalizeLitMixin(LitElement) this._config = config; } - protected render() { + protected render(): TemplateResult { if (!this._config) { return html``; } @@ -47,7 +48,7 @@ export class HuiIconElement extends hassLocalizeLitMixin(LitElement) `; } - private renderStyle() { + private renderStyle(): TemplateResult { return html`