-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
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
Explicit spesifiying generic type parameters, while remain should be infer from function parameters #25603
Comments
I think you're looking for #23696 |
Their is alot in that post, Typically I envisage this to be order thing, were one would typically choose the least constraining function call when the type system was to intersect the function type signature. What are you thoughts regarding, this belongs with the other post, it fit with the partial infer type from air of that post. const testsCallBack = {
test : function (callback : (err : any, result : string) => void)
}
function Prom<R>(object : {}, method : string) : () => Bluebird<R>
function Prom<O extends {}>(object : O, method : keyof O) : Bluebird<Extract<O>>
const sftpWrapper = Prom(testsCallBack, 'test'); // return type BlueBird<{}> |
Looks like I will have to check the next release versions, to see if it is all resolved.. |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
Expect that the remaining generic type parameters that are not explicitly set, should be inferred from the function parameters.
Also see post regarding top type unknown, which could also fix this problem, basically comes down to this being a type infer issues/bug in my opion.
#24439
The text was updated successfully, but these errors were encountered: