Closed
Description
🔎 Search Terms
Generic derivation
🕗 Version & Regression Information
- This is a crash
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
💻 Code
// Your code here
type AnyRecord = Record<string, any>;
type fn = <T extends { a: AnyRecord }>(params: { a: T["a"] }) => T["a"];
const b: fn = (params) => {
return params.a
};
const c = b({
a: {
a1: 123,
},
});
🙁 Actual behavior
Why isn't c deduced to the type I actually passed in?
🙂 Expected behavior
c is deduced to the type I actually passed in
Additional information about the issue
No response