angular/packages/compiler-cli
Matthieu Riegler 3c14d0523c refactor(compiler-cli): Don't emit optional chain non nullable diagnostics on indexed access. (#64007)
When `noUncheckedIndexedAccess` is not enabled, indexed accesses do not include `undefined` in the type.
This makes the OptionalChainNotNullableCheck inconvenient when wanting to safe guard an indexed access (and when the typings isn't helping you).

Ideally project should enable `noUncheckedIndexedAccess` for better typesafety, but this is often inconveninent (we do not enable it by default) and often not the resort of the developer.

So more better coding convinience,  `OptionalChainNotNullableCheck` will not raise an error/warning on indexed Acessed followed by an optional chaining when `noUncheckedIndexedAccess` is not enabled.

See also #63809 which will detect more cases

PR Close #64007
2025-09-24 15:08:06 +00:00
..
linker refactor(bazel): reduce build deps (#63348) 2025-08-28 09:16:10 -07:00
private build: rename defaults2.bzl to defaults.bzl (#63384) 2025-08-25 15:45:46 -07:00
src refactor(compiler-cli): Don't emit optional chain non nullable diagnostics on indexed access. (#64007) 2025-09-24 15:08:06 +00:00
test fix(compiler-cli): resolve import alias in defer blocks (#63966) 2025-09-22 15:52:17 +00:00
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63384) 2025-08-25 15:45:46 -07:00
esbuild.config.js build: use esbuild from aspect rules (#62568) 2025-07-10 13:45:15 -07:00
index.ts refactor(compiler-cli): export type used by migrations (#61697) 2025-05-30 09:50:58 -04:00
package.json build: update all non-major dependencies (#63129) 2025-08-14 22:08:30 +02:00
tsconfig-test.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00
tsconfig.json build: prepare for compiler-cli to be using ts_project (#61181) 2025-05-09 15:59:46 +00:00