From e37849c9178abdc99dff07767b3f02c53bf56c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Tue, 23 Jan 2024 10:45:44 +0000 Subject: [PATCH] fix: Correct case for `FeatureFlag` type [skip pizza] (#2694) --- editor.planx.uk/src/lib/featureFlags.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editor.planx.uk/src/lib/featureFlags.ts b/editor.planx.uk/src/lib/featureFlags.ts index d676604615..a3f255e36b 100644 --- a/editor.planx.uk/src/lib/featureFlags.ts +++ b/editor.planx.uk/src/lib/featureFlags.ts @@ -5,14 +5,14 @@ const AVAILABLE_FEATURE_FLAGS = [ "SHOW_INTERNAL_FEEDBACK", ] as const; -type featureFlag = (typeof AVAILABLE_FEATURE_FLAGS)[number]; +type FeatureFlag = (typeof AVAILABLE_FEATURE_FLAGS)[number]; /** * get list of feature flags that have been enabled for this session * @returns Set of feature flag strings */ const activeFeatureFlags = (() => { - let flags: Set = new Set(); + let flags: Set = new Set(); try { const existingFlags = localStorage.getItem("FEATURE_FLAGS"); if (existingFlags) { @@ -28,7 +28,7 @@ const activeFeatureFlags = (() => { * @param autoReload reload the page after change? default = true */ export const toggleFeatureFlag = ( - featureFlag: featureFlag, + featureFlag: FeatureFlag, autoReload = true, ) => { const supportedFlag = AVAILABLE_FEATURE_FLAGS.includes(featureFlag); @@ -56,7 +56,7 @@ export const toggleFeatureFlag = ( * @param flag flag name * @returns boolean */ -export const hasFeatureFlag = (featureFlag: featureFlag) => +export const hasFeatureFlag = (featureFlag: FeatureFlag) => activeFeatureFlags.has(featureFlag); // add methods to window for easy access in browser console