Replace all private properties with internalProperty decorator (#6386)

This commit is contained in:
Bram Kragten
2020-07-15 06:38:36 +02:00
committed by GitHub
parent 9cd2d0df93
commit f8c5eeab5d
357 changed files with 1236 additions and 920 deletions

View File

@@ -4,7 +4,7 @@ import {
customElement,
html,
LitElement,
property,
internalProperty,
TemplateResult,
} from "lit-element";
import { CastManager } from "../../../src/cast/cast_manager";
@@ -20,7 +20,7 @@ import { HomeAssistant } from "../../../src/types";
class CastDemoRow extends LitElement implements LovelaceRow {
public hass!: HomeAssistant;
@property() private _castManager?: CastManager | null;
@internalProperty() private _castManager?: CastManager | null;
public setConfig(_config: CastConfig): void {
// No config possible.

View File

@@ -5,6 +5,7 @@ import {
html,
LitElement,
property,
internalProperty,
TemplateResult,
} from "lit-element";
import { until } from "lit-html/directives/until";
@@ -21,11 +22,11 @@ import {
} from "../configs/demo-configs";
export class HADemoCard extends LitElement implements LovelaceCard {
@property() public lovelace?: Lovelace;
@property({ attribute: false }) public lovelace?: Lovelace;
@property() public hass!: MockHomeAssistant;
@property({ attribute: false }) public hass!: MockHomeAssistant;
@property() private _switching?: boolean;
@internalProperty() private _switching?: boolean;
private _hidden = localStorage.hide_demo_card;