From c5850977a773be39d5ad1a36b441779031b1b234 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Wed, 16 Aug 2023 18:00:37 -0300 Subject: [PATCH] fix(utils.ts): add TemplateVariableType import to fix type error in checkBaseClass function chore(tsconfig.json): set strict to false and noImplicitAny to true to relax strict type checking and enforce explicit typing --- src/frontend/src/utils/utils.ts | 4 ++-- src/frontend/tsconfig.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/utils/utils.ts b/src/frontend/src/utils/utils.ts index db87094f4..4d9c73f3d 100644 --- a/src/frontend/src/utils/utils.ts +++ b/src/frontend/src/utils/utils.ts @@ -1,7 +1,7 @@ import clsx, { ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; import { ADJECTIVES, DESCRIPTIONS, NOUNS } from "../flow_constants"; -import { APIDataType } from "../types/api"; +import { APIDataType, TemplateVariableType } from "../types/api"; import { IVarHighlightType, groupedObjType, @@ -121,7 +121,7 @@ export function groupByFamily( "int", ]); - const checkBaseClass = (template) => + const checkBaseClass = (template: TemplateVariableType) => template.type && template.show && ((!excludeTypes.has(template.type) && baseClassesSet.has(template.type)) || diff --git a/src/frontend/tsconfig.json b/src/frontend/tsconfig.json index 1879137c5..88e7e83a6 100644 --- a/src/frontend/tsconfig.json +++ b/src/frontend/tsconfig.json @@ -6,7 +6,7 @@ "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, - "strict": true, + "strict": false, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", @@ -15,7 +15,7 @@ "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", - "noImplicitAny": false + "noImplicitAny": true }, "include": ["src"] }