🔎 Search Terms
mapped nonnullable empty object null undefined instantiation
🕗 Version & Regression Information
⏯ Playground Link
https://www.staging-typescript.org/play?ts=5.4.0-dev.20240124#code/C4TwDgpgBAYg9nAPAFQHxQLxQHJwHbYCuANsQIYBGxEiA3lANoDSUAlnlANYQhwBmUZAF0AXIOZCoAX1QBYAFALQkKACUIAZxLBMsBIjwliqIA
💻 Code
type Foo<T> = NonNullable<{ [K in keyof T]: T[K] }>
type Result = Foo<null>
🙁 Actual behavior
Result is of type null
🙂 Expected behavior
Result should be of type never
Additional information about the issue
This likely gets closed as a design limitation like the one here: #56644
🔎 Search Terms
mapped nonnullable empty object null undefined instantiation
🕗 Version & Regression Information
⏯ Playground Link
https://www.staging-typescript.org/play?ts=5.4.0-dev.20240124#code/C4TwDgpgBAYg9nAPAFQHxQLxQHJwHbYCuANsQIYBGxEiA3lANoDSUAlnlANYQhwBmUZAF0AXIOZCoAX1QBYAFALQkKACUIAZxLBMsBIjwliqIA
💻 Code
🙁 Actual behavior
Resultis of typenull🙂 Expected behavior
Resultshould be of typeneverAdditional information about the issue
This likely gets closed as a design limitation like the one here: #56644