chore: fix ee type checks issue. (#32612)

[![workerB](https://img.shields.io/endpoint?url=https%3A%2F%2Fworkerb.linearb.io%2Fv2%2Fbadge%2Fprivate%2FU2FsdGVkX1RhworVRJTWKPbR01bvcARyY7mXv5SA%2Fcollaboration.svg%3FcacheSeconds%3D60)](https://workerb.linearb.io/v2/badge/collaboration-page?magicLinkId=-JgUAyW)
## Description
Fixing type check fails.

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.MobileResponsive"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8647236269>
> Commit: b2aa34efcacd0c5603b45dd177d8259500ee8c38
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8647236269&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
This commit is contained in:
Ashok Kumar M 2024-04-11 19:03:39 +05:30 committed by GitHub
parent f7118422c6
commit a4a364e7c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 16 deletions

View File

@ -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,

View File

@ -61,7 +61,6 @@ export const FEATURE_FLAG = {
export type FeatureFlag = keyof typeof FEATURE_FLAG;
export type FeatureFlags = Record<FeatureFlag, boolean>;
export type OverriddenFeatureFlags = Partial<Record<FeatureFlag, boolean>>;
export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
TEST_FLAG: true,

View File

@ -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) => {

View File

@ -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: {

View File

@ -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<Record<FeatureFlag, boolean>>;
export const useFeatureFlagOverride = () => {
const dispatch = useDispatch();

View File

@ -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;