From c5b6297ceaba1d0fbdecf56f5ec47c7e11e693d3 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 25 May 2024 17:52:19 +0530 Subject: [PATCH] Wrap --- web/apps/auth/tsconfig.json | 6 ++++-- web/packages/build-config/tsconfig-typecheck.json | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/web/apps/auth/tsconfig.json b/web/apps/auth/tsconfig.json index 11ae2368d..507ae19bd 100644 --- a/web/apps/auth/tsconfig.json +++ b/web/apps/auth/tsconfig.json @@ -10,9 +10,11 @@ /* Set the base directory from which to resolve bare module names */ "baseUrl": "./src", - /* TODO: Enable these */ + /* This is hard to enforce in certain cases where we do a lot of array + indexing, e.g. image/ML ops, and TS doesn't currently have a way to + disable this for blocks of code. */ "noUncheckedIndexedAccess": false, - /* MUI doesn't play great with exactOptionalPropertyTypes currently */ + /* MUI doesn't play great with exactOptionalPropertyTypes currently. */ "exactOptionalPropertyTypes": false } } diff --git a/web/packages/build-config/tsconfig-typecheck.json b/web/packages/build-config/tsconfig-typecheck.json index 3db22b5d2..9f3d5fcb4 100644 --- a/web/packages/build-config/tsconfig-typecheck.json +++ b/web/packages/build-config/tsconfig-typecheck.json @@ -67,8 +67,10 @@ "noUnusedParameters": true, "noUnusedLocals": true, "noFallthroughCasesInSwitch": true, - /* e.g. makes array indexing returns undefined */ + /* e.g. makes array indexing returns undefined. */ "noUncheckedIndexedAccess": true, + /* Treat optional (?) properties and properties where undefined is a + valid value separately */ "exactOptionalPropertyTypes": true } }