mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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 |
||
|---|---|---|
| .. | ||
| linker | ||
| private | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| esbuild.config.js | ||
| index.ts | ||
| package.json | ||
| tsconfig-test.json | ||
| tsconfig.json | ||