Bug Report
🔎 Search Terms
I've posted this problem on StackOverflow but received no comments or answers.
This problem is rather difficult to describe briefly in natural language (or maybe due to my poor English), thus I failed to find any relative questions through the search engine.
🕗 Version & Regression Information
I'm currently using TypeScript 4.4.4, earlier versions are not tested, but I suppose they'll behave the same.
💻 Code
type a = { foo: "bar" } extends { "foo" } ? true : false;
type b = { [K in keyof { "foo" }]: { foo: "bar" } extends { K } ? true : false }["foo"];
🙁 Actual behavior
🙂 Expected behavior
b should also be true
Bug Report
🔎 Search Terms
I've posted this problem on StackOverflow but received no comments or answers.
This problem is rather difficult to describe briefly in natural language (or maybe due to my poor English), thus I failed to find any relative questions through the search engine.
🕗 Version & Regression Information
I'm currently using TypeScript 4.4.4, earlier versions are not tested, but I suppose they'll behave the same.
💻 Code
🙁 Actual behavior
🙂 Expected behavior
bshould also betrue