Skip to content

Commit

Permalink
move UpdateActionProps interface to a types file
Browse files Browse the repository at this point in the history
  • Loading branch information
dvj1988 committed Jan 22, 2025
1 parent 17aede9 commit fc26db6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { WorkerMessenger } from "workers/Evaluation/fns/utils/Messenger";
import type { UpdatedPathsMap } from "workers/Evaluation/JSObject/JSVariableUpdates";
import { applyJSVariableUpdatesToEvalTree } from "workers/Evaluation/JSObject/JSVariableUpdates";
import ExecutionMetaData from "./ExecutionMetaData";
import type { UpdateActionProps } from "workers/Evaluation/handlers/updateActionData";
import type { UpdateActionProps } from "workers/Evaluation/handlers/types";
import { handleActionsDataUpdate } from "workers/Evaluation/handlers/updateActionData";
import { getEntityNameAndPropertyPath } from "ee/workers/Evaluation/evaluationUtils";
import type { Patch } from "workers/Evaluation/JSObject/Collection";
Expand Down
6 changes: 6 additions & 0 deletions app/client/src/workers/Evaluation/handlers/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface UpdateActionProps {
entityName: string;
dataPath: string;
data: unknown;
dataPathRef?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ import { evalTreeWithChanges } from "../evalTreeWithChanges";
import DataStore from "../dataStore";
import { EVAL_WORKER_SYNC_ACTION } from "ee/workers/Evaluation/evalWorkerActions";
import type { DataTree } from "entities/DataTree/dataTreeTypes";
import type { UpdateActionProps } from "./types";

export interface UpdateActionProps {
entityName: string;
dataPath: string;
data: unknown;
dataPathRef?: string;
}
export default function (request: EvalWorkerSyncRequest) {
const actionsDataToUpdate: UpdateActionProps[] = request.data;

Expand Down
2 changes: 1 addition & 1 deletion app/client/src/workers/Evaluation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type { APP_MODE } from "entities/App";
import type { WebworkerSpanData, Attributes } from "instrumentation/types";
import type { ICacheProps } from "../common/AppComputationCache/types";
import type { AffectedJSObjects } from "actions/EvaluationReduxActionTypes";
import type { UpdateActionProps } from "./handlers/updateActionData";
import type { UpdateActionProps } from "./handlers/types";

// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/workers/common/DataTreeEvaluator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ import { getDataTreeContext } from "ee/workers/Evaluation/Actions";
import { WorkerEnv } from "workers/Evaluation/handlers/workerEnv";
import type { WebworkerSpanData, Attributes } from "instrumentation/types";
import type { AffectedJSObjects } from "actions/EvaluationReduxActionTypes";
import type { UpdateActionProps } from "workers/Evaluation/handlers/updateActionData";
import type { UpdateActionProps } from "workers/Evaluation/handlers/types";

type SortedDependencies = Array<string>;
export interface EvalProps {
Expand Down

0 comments on commit fc26db6

Please sign in to comment.