You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expect that the remaining generic type parameters that are not explicitly set, should be inferred from the function parameters.
consttestsCallBack={test : function(callback : (err : any,result : string)=>void)}functionProm<Rextendsany,MextendskeyofO=any,Oextends{}=any>(object : O,method : M) : voidconstsftpWrapper=Prom<ssh2.SFTPWrapper>(testsCallBack,'test');// I would expect that the typing engine should infer the remain generics that are not explicitly set.constsftpWrapper=Prom<ssh2.SFTPWrapper>(testsCallBack,'tet');//CompilerErrorconstsftpWrapper=Prom(ssh2,'fastGet');// returns a good implementation of the types library
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.