From 9617758d8baa6d8e3a8636059d950b88f897ad48 Mon Sep 17 00:00:00 2001 From: nokeo08 Date: Wed, 17 Jun 2026 16:35:33 -0500 Subject: [PATCH] Enable noUncheckedIndexedAccess in tsconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tighter type-checking: array indexing and dynamic property access now return T | undefined rather than T. Catches bugs where code assumes a key exists without checking. No code changes were needed — the existing modules already either: - cast through Record (configFile.ts), where access is already 'unknown'; - cast values from parseArgs to '... | undefined' (cli.ts), already nullable; or - use static, statically-known fields (Config, ConfigOverrides, DEFAULT_CONFIG). tsc --noEmit remains clean. The full test suite still passes. --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 91d3a2f..7ddb75a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,8 @@ "noEmit": true, "allowImportingTsExtensions": true, "verbatimModuleSyntax": true, - "resolveJsonModule": true + "resolveJsonModule": true, + "noUncheckedIndexedAccess": true }, "include": ["src/**/*.ts"] }