Closed Evanlec closed 6 years ago
@Evanlec Thanks for pointing out. Let me see, how could we include type information for sftp class
Added support for sftp Type information. https://github.com/sanketbajoria/ssh2-promise/commit/f6c9f7f708ec329d2a313e8d90ca65b3beeb4cad
Your sftp.d.ts file specifies the SFTP class type as:
However, this only tells the typescript compiler about EventEmitter methods, it does not indicate all of the SSH2 methods like 'readdir()', 'mkdir()', etc
I am wondering if you can simply import the SFTPWrapper interface from the SSH2 library type definition, here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/11b48a05a8c7f2fb931ae89886006b7e1ab420e7/types/ssh2/index.d.ts#L1247
Then simply have your SFTP class extend that interface, which should give you all the methods...although those are not promisified