From b835e1e02bd106fa1ce05e373b8dbeffef000616 Mon Sep 17 00:00:00 2001 From: karooolis Date: Mon, 5 Aug 2024 11:04:52 +0300 Subject: [PATCH] fix ts errors --- packages/world-explorer/src/app/(home)/EditableTableCell.tsx | 2 +- packages/world-explorer/src/app/(home)/utils/getFieldIdx.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/world-explorer/src/app/(home)/EditableTableCell.tsx b/packages/world-explorer/src/app/(home)/EditableTableCell.tsx index 6ddb9ee906..170cf255af 100644 --- a/packages/world-explorer/src/app/(home)/EditableTableCell.tsx +++ b/packages/world-explorer/src/app/(home)/EditableTableCell.tsx @@ -18,7 +18,7 @@ import { getFieldIdx } from "./utils/getFieldIdx"; type Props = { name: string; value: string; - keyTuple: [string]; + keyTuple: string[]; config: TableConfig; }; diff --git a/packages/world-explorer/src/app/(home)/utils/getFieldIdx.ts b/packages/world-explorer/src/app/(home)/utils/getFieldIdx.ts index 215b5c44b9..9d1b161d5b 100644 --- a/packages/world-explorer/src/app/(home)/utils/getFieldIdx.ts +++ b/packages/world-explorer/src/app/(home)/utils/getFieldIdx.ts @@ -3,7 +3,10 @@ import { isStaticAbiType, } from "@latticexyz/schema-type/internal"; -export function getFieldIdx(valueSchema, fieldName) { +export function getFieldIdx( + valueSchema: Record, + fieldName: string, +) { const fieldNames = [ ...Object.entries(valueSchema) .filter(([, fieldType]) => isStaticAbiType(fieldType))