mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
Merge pull request #23950 from danielgronberg/master
Added null as valid argument type to ssh2-sftp-client get
This commit is contained in:
Vendored
+1
-1
@@ -10,7 +10,7 @@ export = sftp;
|
||||
declare class sftp {
|
||||
connect(options: ssh2.ConnectConfig): Promise<void>;
|
||||
list(remoteFilePath: string): Promise<sftp.FileInfo[]>;
|
||||
get(remoteFilePath: string, useCompression?: boolean, encoding?: string): Promise<NodeJS.ReadableStream>;
|
||||
get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise<NodeJS.ReadableStream>;
|
||||
put(input: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, useCompression?: boolean, encoding?: string): Promise<void>;
|
||||
mkdir(remoteFilePath: string, recursive?: boolean): Promise<void>;
|
||||
rmdir(remoteFilePath: string, recursive?: boolean): Promise<void>;
|
||||
|
||||
@@ -12,7 +12,8 @@ client.connect({
|
||||
client.list('/remote/path').then(() => null);
|
||||
|
||||
client.get('/remote/path').then(stream => stream.read(0));
|
||||
client.get('/remote/path', true, 'binary').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));
|
||||
|
||||
client.put('/local/path', '/remote/path').then(() => null);
|
||||
client.put(new Buffer('content'), '/remote/path').then(() => null);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
|
||||
Reference in New Issue
Block a user