diff --git a/frontends/nextjs/e2e/crud.spec.ts b/frontends/nextjs/e2e/crud.spec.ts index e11df9e1f..c44c54902 100644 --- a/frontends/nextjs/e2e/crud.spec.ts +++ b/frontends/nextjs/e2e/crud.spec.ts @@ -1,7 +1,7 @@ -import { expect,test } from '@playwright/test'; +import { expect, test, Page } from '@playwright/test'; // Helper function to navigate to login page -async function navigateToLogin(page: any) { +async function navigateToLogin(page: Page) { await page.goto('/'); // Click "Sign In" button to navigate to login page await page.getByRole('button', { name: /sign in|get started/i }).first().click(); diff --git a/frontends/nextjs/e2e/login.spec.ts b/frontends/nextjs/e2e/login.spec.ts index f46802b5f..8ef0d4f4d 100644 --- a/frontends/nextjs/e2e/login.spec.ts +++ b/frontends/nextjs/e2e/login.spec.ts @@ -1,7 +1,7 @@ -import { expect,test } from '@playwright/test'; +import { expect, test, Page } from '@playwright/test'; // Helper function to navigate to login page -async function navigateToLogin(page: any) { +async function navigateToLogin(page: Page) { await page.goto('/'); // Click "Sign In" button to navigate to login page await page.getByRole('button', { name: /sign in|get started/i }).first().click(); diff --git a/frontends/nextjs/src/lib/db/functions/components/crud/update-component-node.ts b/frontends/nextjs/src/lib/db/functions/components/crud/update-component-node.ts index 2fda2e8b0..00e3e0217 100644 --- a/frontends/nextjs/src/lib/db/functions/components/crud/update-component-node.ts +++ b/frontends/nextjs/src/lib/db/functions/components/crud/update-component-node.ts @@ -15,7 +15,13 @@ export const updateComponentNode = async ( nodeId: string, updates: Partial ): Promise => { - const data: any = {} + const data: Partial<{ + type: string + parentId: string | null + childIds: string + order: number + pageId: string + }> = {} if (updates.type !== undefined) data.type = updates.type if (updates.parentId !== undefined) data.parentId = updates.parentId if (updates.childIds !== undefined) data.childIds = JSON.stringify(updates.childIds) diff --git a/frontends/nextjs/src/lib/rendering/page/page-renderer/functions/execute-lua-script.ts b/frontends/nextjs/src/lib/rendering/page/page-renderer/functions/execute-lua-script.ts index d67323e65..a1906a713 100644 --- a/frontends/nextjs/src/lib/rendering/page/page-renderer/functions/execute-lua-script.ts +++ b/frontends/nextjs/src/lib/rendering/page/page-renderer/functions/execute-lua-script.ts @@ -3,8 +3,9 @@ import { executeLuaScriptWithProfile } from '@/lib/lua/execute-lua-script-with-p import type { LuaEngine } from '@/lib/lua-engine' import type { ComponentInstance } from '@/lib/types/builder-types' import type { User } from '@/lib/types/level-types' +import type { JsonValue } from '@/types/utility-types' -export async function executeLuaScript(scriptId: string, context: Record): Promise { +export async function executeLuaScript(scriptId: string, context: Record): Promise { const scripts = await Database.getLuaScripts() const script = scripts.find(s => s.id === scriptId) if (!script) {