Use const enums where possible (#10110)

This commit is contained in:
Bram Kragten 2021-09-30 16:44:28 +02:00 committed by GitHub
parent e023d60be7
commit 597d4a0426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ import {
HassEntityBase, HassEntityBase,
} from "home-assistant-js-websocket"; } from "home-assistant-js-websocket";
export enum LightColorModes { export const enum LightColorModes {
UNKNOWN = "unknown", UNKNOWN = "unknown",
ONOFF = "onoff", ONOFF = "onoff",
BRIGHTNESS = "brightness", BRIGHTNESS = "brightness",

View File

@ -2,7 +2,7 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket";
import { HomeAssistant } from "../types"; import { HomeAssistant } from "../types";
import { DeviceRegistryEntry } from "./device_registry"; import { DeviceRegistryEntry } from "./device_registry";
export enum InclusionStrategy { export const enum InclusionStrategy {
/** /**
* Always uses Security S2 if supported, otherwise uses Security S0 for certain devices which don't work without encryption and uses no encryption otherwise. * Always uses Security S2 if supported, otherwise uses Security S0 for certain devices which don't work without encryption and uses no encryption otherwise.
* *
@ -154,7 +154,7 @@ export interface ZWaveJSRemovedNode {
label: string; label: string;
} }
export enum NodeStatus { export const enum NodeStatus {
Unknown, Unknown,
Asleep, Asleep,
Awake, Awake,

View File

@ -23,7 +23,7 @@ const DEFAULT_FILTER = "grayscale(100%)";
const MAX_IMAGE_WIDTH = 640; const MAX_IMAGE_WIDTH = 640;
const ASPECT_RATIO_DEFAULT = 9 / 16; const ASPECT_RATIO_DEFAULT = 9 / 16;
enum LoadState { const enum LoadState {
Loading = 1, Loading = 1,
Loaded = 2, Loaded = 2,
Error = 3, Error = 3,