mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
[@types/ssh2-sftp-client] multi-line "definitions by"; added new tests
This commit is contained in:
Vendored
+4
-1
@@ -1,6 +1,9 @@
|
||||
// Type definitions for ssh2-sftp-client 2.4
|
||||
// Project: https://www.npmjs.com/package/ssh2-sftp-client
|
||||
// Definitions by: igrayson <https://github.com/igrayson>, Ascari Andrea <https://github.com/ascariandrea>, Kartik Malik <https://github.com/kartik2406>, Michael Pertl <https://github.com/viamuli>
|
||||
// Definitions by: igrayson <https://github.com/igrayson>
|
||||
// Ascari Andrea <https://github.com/ascariandrea>
|
||||
// Kartik Malik <https://github.com/kartik2406>
|
||||
// Michael Pertl <https://github.com/viamuli>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as ssh2 from 'ssh2';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Client = require('ssh2-sftp-client');
|
||||
import * as fs from 'fs';
|
||||
|
||||
const client = new Client();
|
||||
|
||||
client.connect({
|
||||
@@ -11,6 +12,10 @@ client.connect({
|
||||
|
||||
client.list('/remote/path').then(() => null);
|
||||
|
||||
client.exists('/remote/path').then(() => null);
|
||||
|
||||
client.stat('/remote/path').then(() => null);
|
||||
|
||||
client.get('/remote/path').then(stream => stream.read(0));
|
||||
client.get('/remote/path', true, 'utf8').then(stream => stream.read(0));
|
||||
client.get('/remote/path', true, null).then(stream => stream.read(0));
|
||||
@@ -30,6 +35,8 @@ client.delete('remote/path').then(() => null);
|
||||
|
||||
client.rename('/remote/from', '/remote/to').then(() => null);
|
||||
|
||||
client.chmod('/remote/path', 777).then(() => null);
|
||||
|
||||
client.end().then(() => null);
|
||||
|
||||
client.on('event', () => null);
|
||||
|
||||
Reference in New Issue
Block a user