From 3bd61a2bbff6094d03eb1e12c8bbfea4a7005c3b Mon Sep 17 00:00:00 2001 From: Vemparala Surya Vamsi <121419957+vsvamsi1@users.noreply.github.com> Date: Tue, 5 Nov 2024 06:01:20 +0530 Subject: [PATCH] chore: fixed type issue for moduleInstances (#37208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Fixed type issue for moduleInstances in the dataTreeFactory. 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.Sanity" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 1e988df3ad09cac3b57caf73e0f18b450307dab6 > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Mon, 04 Nov 2024 17:20:56 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Enhanced type safety for the `moduleInstanceEntities` parameter in the `DataTreeFactory` class, improving clarity and maintainability. - **Bug Fixes** - Removed the ESLint directive that suppressed warnings about the use of `any`, promoting stricter type enforcement. --- app/client/src/entities/DataTree/dataTreeFactory.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/client/src/entities/DataTree/dataTreeFactory.ts b/app/client/src/entities/DataTree/dataTreeFactory.ts index 17e3ecccf9..1d3cbb6ec8 100644 --- a/app/client/src/entities/DataTree/dataTreeFactory.ts +++ b/app/client/src/entities/DataTree/dataTreeFactory.ts @@ -24,6 +24,8 @@ import type { DependencyMap, FormEditorConfigs, } from "utils/DynamicBindingUtils"; +import type { DataTreeSeed } from "ee/entities/DataTree/types"; + export class DataTreeFactory { public static metaWidgets( metaWidgets: MetaWidgetsReduxState, @@ -52,11 +54,10 @@ export class DataTreeFactory { }; } - // eslint-disable-next-line @typescript-eslint/no-explicit-any public static widgets( moduleInputs: Module["inputsForm"], moduleInstances: Record | null, - moduleInstanceEntities: null, + moduleInstanceEntities: DataTreeSeed["moduleInstanceEntities"], widgets: CanvasWidgetsReduxState, widgetsMeta: MetaState, loadingEntities: LoadingEntitiesState,