add SFTP type in ssh2

This commit is contained in:
Horiuchi_H
2016-04-08 16:50:58 +09:00
parent ec9eb4b28c
commit a6c6948127
2 changed files with 95 additions and 4 deletions
+2 -2
View File
@@ -132,9 +132,9 @@ var Client = require('ssh2').Client;
var conn = new Client();
conn.on('ready', () => {
console.log('Client :: ready');
conn.sftp( (err: Error, sftp: any) => {
conn.sftp( (err: Error, sftp: ssh2.Sftp.Wrapper) => {
if (err) throw err;
sftp.readdir('foo', (err: Error, list: any) => {
sftp.readdir('foo', (err: Error, list: ssh2.Sftp.ReadDirItem[]) => {
if (err) throw err;
console.dir(list);
conn.end();