We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[email protected]
type MP2 = { a1: "a2"; b1: "b2"; }; type MP3 = { a1: "a3"; b1: "b3"; }; type MR = { a1: "ar"; b1: "br"; }; function foo<K extends keyof MP2>(p1: K, p2: MP2[K], p3: MP3[K]): MR[K] { return { p1, p2, p3 } as any; }
// no errror curry(foo)('a1')('b2') // "ar" | "br" const r = curry(foo)('a1')('a2')('a3') void r
// @ts-expect-error curry(foo)('a1')('b2') // "ar" const r = curry(foo)('a1')('a2')('a3') void r
RyanCavanaugh said it is possible.
microsoft/TypeScript#50991 (comment)
The text was updated successfully, but these errors were encountered:
Thank you. Not great at TS so I will leave this out there if anyone wants to take it.
Sorry, something went wrong.
No branches or pull requests
Package
[email protected]
Example
Actual
Expected
Related
RyanCavanaugh said it is possible.
microsoft/TypeScript#50991 (comment)
The text was updated successfully, but these errors were encountered: