Bug Report
🔎 Search Terms
4.8 nonnullable cannot be used to index type
🕗 Version & Regression Information
4.8.0-dev.20220624
- This changed between versions 4.7.4 and 4.8-beta
⏯ Playground Link
Playground link with relevant code
💻 Code
type Foo = { [key: string]: unknown }
type NullableFoo = Foo | undefined
type Bar<T extends NullableFoo> = NonNullable<T>[string] //error on 4.8, no error on 4.7
type Baz<T extends Foo> = NonNullable<T>[string] // no error
type Qux = NonNullable<NullableFoo>[string] // no error
🙁 Actual behavior
Type 'string' cannot be used to index type 'NonNullable'.(2536)
🙂 Expected behavior
no error
Bug Report
🔎 Search Terms
4.8 nonnullable cannot be used to index type
🕗 Version & Regression Information
4.8.0-dev.20220624
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
🙂 Expected behavior
no error