diff --git a/app/client/src/actions/featureFlagActions.ts b/app/client/src/actions/featureFlagActions.ts index 1311ecfeaa..a805cfa1d0 100644 --- a/app/client/src/actions/featureFlagActions.ts +++ b/app/client/src/actions/featureFlagActions.ts @@ -1,5 +1,5 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import type { OverriddenFeatureFlags } from "@appsmith/entities/FeatureFlag"; +import type { OverriddenFeatureFlags } from "utils/hooks/useFeatureFlagOverride"; export const setFeatureFlagOverridesAction = ( overrides: OverriddenFeatureFlags, diff --git a/app/client/src/ce/entities/FeatureFlag.ts b/app/client/src/ce/entities/FeatureFlag.ts index 8bb2712afd..29c19a8b25 100644 --- a/app/client/src/ce/entities/FeatureFlag.ts +++ b/app/client/src/ce/entities/FeatureFlag.ts @@ -61,7 +61,6 @@ export const FEATURE_FLAG = { export type FeatureFlag = keyof typeof FEATURE_FLAG; export type FeatureFlags = Record; -export type OverriddenFeatureFlags = Partial>; export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = { TEST_FLAG: true, diff --git a/app/client/src/ce/selectors/featureFlagsSelectors.ts b/app/client/src/ce/selectors/featureFlagsSelectors.ts index 66e4216de6..9bcc0efef5 100644 --- a/app/client/src/ce/selectors/featureFlagsSelectors.ts +++ b/app/client/src/ce/selectors/featureFlagsSelectors.ts @@ -1,12 +1,9 @@ import type { AppState } from "@appsmith/reducers"; -import type { - FeatureFlag, - FeatureFlags, - OverriddenFeatureFlags, -} from "@appsmith/entities/FeatureFlag"; +import type { FeatureFlag, FeatureFlags } from "@appsmith/entities/FeatureFlag"; import { createSelector } from "reselect"; import { FEATURE_FLAG } from "@appsmith/entities/FeatureFlag"; import memoize from "micro-memoize"; +import type { OverriddenFeatureFlags } from "utils/hooks/useFeatureFlagOverride"; const combineFeatureFlags = memoize( (featureFlags: FeatureFlags, overriddenFlags: OverriddenFeatureFlags) => { diff --git a/app/client/src/reducers/uiReducers/usersReducer.ts b/app/client/src/reducers/uiReducers/usersReducer.ts index e325460582..4dd7b52ba3 100644 --- a/app/client/src/reducers/uiReducers/usersReducer.ts +++ b/app/client/src/reducers/uiReducers/usersReducer.ts @@ -8,11 +8,9 @@ import { import type { User } from "constants/userConstants"; import { DefaultCurrentUserDetails } from "constants/userConstants"; -import type { - FeatureFlags, - OverriddenFeatureFlags, -} from "@appsmith/entities/FeatureFlag"; +import type { FeatureFlags } from "@appsmith/entities/FeatureFlag"; import { DEFAULT_FEATURE_FLAG_VALUE } from "@appsmith/entities/FeatureFlag"; +import type { OverriddenFeatureFlags } from "utils/hooks/useFeatureFlagOverride"; const initialState: UsersReduxState = { loadingStates: { diff --git a/app/client/src/utils/hooks/useFeatureFlagOverride.ts b/app/client/src/utils/hooks/useFeatureFlagOverride.ts index 07298f7411..99625d941e 100644 --- a/app/client/src/utils/hooks/useFeatureFlagOverride.ts +++ b/app/client/src/utils/hooks/useFeatureFlagOverride.ts @@ -1,7 +1,4 @@ -import type { - FeatureFlag, - OverriddenFeatureFlags, -} from "@appsmith/entities/FeatureFlag"; +import type { FeatureFlag } from "@appsmith/entities/FeatureFlag"; import { setFeatureFlagOverridesAction, updateFeatureFlagOverrideAction, @@ -20,6 +17,7 @@ export const AvailableFeaturesToOverride: FeatureFlag[] = [ "ab_wds_enabled", "release_layout_conversion_enabled", ]; +export type OverriddenFeatureFlags = Partial>; export const useFeatureFlagOverride = () => { const dispatch = useDispatch(); diff --git a/app/client/src/utils/storage.ts b/app/client/src/utils/storage.ts index ef8b0b944b..300d4a0024 100644 --- a/app/client/src/utils/storage.ts +++ b/app/client/src/utils/storage.ts @@ -5,8 +5,8 @@ import type { VersionUpdateState } from "../sagas/WebsocketSagas/versionUpdatePr import { isNumber } from "lodash"; import { EditorModes } from "components/editorComponents/CodeEditor/EditorConfig"; import type { EditorViewMode } from "@appsmith/entities/IDE/constants"; +import type { OverriddenFeatureFlags } from "./hooks/useFeatureFlagOverride"; import { AvailableFeaturesToOverride } from "./hooks/useFeatureFlagOverride"; -import type { OverriddenFeatureFlags } from "@appsmith/entities/FeatureFlag"; export const STORAGE_KEYS: { [id: string]: string;