Manav Rathi 1 year ago
parent
commit
c5b6297cea
2 changed files with 7 additions and 3 deletions
  1. 4 2
      web/apps/auth/tsconfig.json
  2. 3 1
      web/packages/build-config/tsconfig-typecheck.json

+ 4 - 2
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
     }
 }

+ 3 - 1
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
     }
 }