behavior of noUncheckedIndexedAccess
is inconsistent.
#57794
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
π Search Terms
"noUncheckedIndexedAccess" "undefined"
π Version & Regression Information
5.4.2
β― Playground Link
https://www.typescriptlang.org/play?noUncheckedIndexedAccess=true&exactOptionalPropertyTypes=false&noPropertyAccessFromIndexSignature=false#code/C4TwDgpgBAggTnKBeKBnYcCWA7A5gbQF0AoY0SKAFQEZlYF8AGEgehag4D0B+UgEwgBjADYBDONEEB7bOiji4ALnpxS02cCjBaKBU1bsOUHsSA
π» Code
π Actual behavior
behavior of
noUncheckedIndexedAccess
is inconsistent.π Expected behavior
The type obtained from
type T1 = Arr[0]
should bestring | undefined
.Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: