angular/packages/compiler-cli
Matthieu Riegler 7e8e310868 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:05 +00:00
..
linker refactor(compiler-cli): support regular expression literals in AOT compiler (#63887) 2025-09-18 15:08:56 +00:00
private build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
src refactor(compiler-cli): Don't emit optional chain non nullable diagnostics on indexed access. (#64007) 2025-09-24 15:08:05 +00:00
test fix(compiler-cli): resolve import alias in defer blocks (#63966) 2025-09-22 15:52:16 +00:00
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -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 (#63661) 2025-09-10 07:11:54 -07: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