From 1437cf3ea5b705c6e697a572c76dafa910b13bf4 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 12 Apr 2020 17:46:37 +0200 Subject: [PATCH] config/enum.ts: Refactor enums into interface and object Signed-off-by: David Mehren --- lib/config/enum.ts | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/lib/config/enum.ts b/lib/config/enum.ts index 83b81d5fc..2ebb1a275 100644 --- a/lib/config/enum.ts +++ b/lib/config/enum.ts @@ -1,14 +1,29 @@ -export enum Environment { - development = 'development', - production = 'production', - test = 'test' +export interface Environment { + development: string; + production: string; + test: string; } -export enum Permission { - freely = 'freely', - editable = 'editable', - limited = 'limited', - locked = 'locked', - protected = 'protected', - private = 'private' +export const Environment: Environment = { + development: 'development', + production: 'production', + test: 'test' +} + +export interface Permission { + freely: string; + editable: string; + limited: string; + locked: string; + protected: string; + private: string; +} + +export const Permission: Permission = { + freely: 'freely', + editable: 'editable', + limited: 'limited', + locked: 'locked', + protected: 'protected', + private: 'private' }