sanketbajoria / ssh2-promise

ssh with promise/async await and typescript support
https://www.npmjs.com/package/ssh2-promise
MIT License
148 stars 25 forks source link

Typescript error with createReadStream #24

Closed jeffrson closed 5 years ago

jeffrson commented 5 years ago

This typescript source

import SSH2Promise = require('ssh2-promise')

let sshconfig = {}

let ssh = new SSH2Promise(sshconfig)
let sftp = ssh.sftp()

sftp.createReadStream('/file')

gives the following error (TS 3.3):

error TS2554: Expected 0 arguments, but got 1.

for sftp.createReadStream.

sanketbajoria commented 5 years ago

Will be fixing it soon. Typescript index file wrongly generated.

sanketbajoria commented 5 years ago

@jeffrson Fixed it https://github.com/sanketbajoria/ssh2-promise/commit/dad5e3f0028f6fe16e4bbf1b4aefaa005e7bf01c