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
infer optional arguments parameters.
Here are some issues that might be related:
T extends F<T>
But this case is even simpler.
4.8.4 - 5.0.4
It is working correctly in 4.7.4
Playground link with relevant code
function define<P extends unknown[], Result>(fn: (...args: P) => Result): typeof fn { return fn } // (optional?: { a: number; } | undefined) => void const fn1 = define((optional?: { a: number }) => { }) // () => { foo(): void; } const fn2 = define((optional?: { a: number }) => ({ foo() { } }))
// () => { foo(): void; } const fn2 = define((optional?: { a: number }) => ({ foo() { } }))
// (optional?: { a: number; } | undefined) => { foo(): void; } const fn2 = define((optional?: { a: number }) => ({ foo() { } }))
The text was updated successfully, but these errors were encountered:
Check nightly; the behavior should be fixed. (On my phone or I'd bisect it.)
Sorry, something went wrong.
Yes, confirmed it is fixed in nightly 20130415 20230415
nightly 20130415
2013? Those TypeScript devs are something else, fixing bugs retroactively
No branches or pull requests
Bug Report
🔎 Search Terms
infer optional arguments parameters.
Here are some issues that might be related:
T extends F<T>
#51377But this case is even simpler.
🕗 Version & Regression Information
4.8.4 - 5.0.4
It is working correctly in 4.7.4
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
🙂 Expected behavior
The text was updated successfully, but these errors were encountered: