From 7e0d189560a143bf713a36f960f051f633d2aef1 Mon Sep 17 00:00:00 2001 From: Spencer Torres Date: Fri, 14 Jun 2024 15:05:27 +0000 Subject: [PATCH] upgrade lib to ES2023.Array, use toSpliced --- .config/tsconfig.json | 3 ++- src/components/configEditor/AliasTableConfig.tsx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/tsconfig.json b/.config/tsconfig.json index 64b37690..9fe0f0b9 100644 --- a/.config/tsconfig.json +++ b/.config/tsconfig.json @@ -11,7 +11,8 @@ "rootDir": "../src", "baseUrl": "../src", "typeRoots": ["../node_modules/@types"], - "resolveJsonModule": true + "resolveJsonModule": true, + "lib": ["ES2023.Array"], }, "ts-node": { "compilerOptions": { diff --git a/src/components/configEditor/AliasTableConfig.tsx b/src/components/configEditor/AliasTableConfig.tsx index d5fdb8ce..478255c6 100644 --- a/src/components/configEditor/AliasTableConfig.tsx +++ b/src/components/configEditor/AliasTableConfig.tsx @@ -40,8 +40,7 @@ export const AliasTableConfig = (props: AliasTablesConfigProps) => { }])); } const removeEntry = (index: number) => { - let nextEntries: AliasTableEntry[] = entries.slice(); - nextEntries.splice(index, 1); + let nextEntries = entries.toSpliced(index, 1); nextEntries = removeDuplicateEntries(nextEntries); setEntries(nextEntries); onAliasTablesChange(nextEntries);