Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use const enums where possible #10110

Merged
merged 1 commit into from Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/data/light.ts
Expand Up @@ -3,7 +3,7 @@ import {
HassEntityBase,
} from "home-assistant-js-websocket";

export enum LightColorModes {
export const enum LightColorModes {
UNKNOWN = "unknown",
ONOFF = "onoff",
BRIGHTNESS = "brightness",
Expand Down
4 changes: 2 additions & 2 deletions src/data/zwave_js.ts
Expand Up @@ -2,7 +2,7 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket";
import { HomeAssistant } from "../types";
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.
*
Expand Down Expand Up @@ -154,7 +154,7 @@ export interface ZWaveJSRemovedNode {
label: string;
}

export enum NodeStatus {
export const enum NodeStatus {
Unknown,
Asleep,
Awake,
Expand Down
2 changes: 1 addition & 1 deletion src/panels/lovelace/components/hui-image.ts
Expand Up @@ -23,7 +23,7 @@ const DEFAULT_FILTER = "grayscale(100%)";
const MAX_IMAGE_WIDTH = 640;
const ASPECT_RATIO_DEFAULT = 9 / 16;

enum LoadState {
const enum LoadState {
Loading = 1,
Loaded = 2,
Error = 3,
Expand Down