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
This commit is contained in:
anovazzi1 2023-08-16 18:00:37 -03:00
commit c5850977a7
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
import clsx, { ClassValue } from "clsx"; import clsx, { ClassValue } from "clsx";
import { twMerge } from "tailwind-merge"; import { twMerge } from "tailwind-merge";
import { ADJECTIVES, DESCRIPTIONS, NOUNS } from "../flow_constants"; import { ADJECTIVES, DESCRIPTIONS, NOUNS } from "../flow_constants";
import { APIDataType } from "../types/api"; import { APIDataType, TemplateVariableType } from "../types/api";
import { import {
IVarHighlightType, IVarHighlightType,
groupedObjType, groupedObjType,
@ -121,7 +121,7 @@ export function groupByFamily(
"int", "int",
]); ]);
const checkBaseClass = (template) => const checkBaseClass = (template: TemplateVariableType) =>
template.type && template.type &&
template.show && template.show &&
((!excludeTypes.has(template.type) && baseClassesSet.has(template.type)) || ((!excludeTypes.has(template.type) && baseClassesSet.has(template.type)) ||

View file

@ -6,7 +6,7 @@
"skipLibCheck": true, "skipLibCheck": true,
"esModuleInterop": true, "esModuleInterop": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"strict": true, "strict": false,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"module": "esnext", "module": "esnext",
@ -15,7 +15,7 @@
"isolatedModules": true, "isolatedModules": true,
"noEmit": true, "noEmit": true,
"jsx": "react-jsx", "jsx": "react-jsx",
"noImplicitAny": false "noImplicitAny": true
}, },
"include": ["src"] "include": ["src"]
} }