mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Fix get() dst param. Should be writable stream (#42135)
This commit is contained in:
parent
53089a8608
commit
09bee8f86e
23
types/ssh2-sftp-client/index.d.ts
vendored
23
types/ssh2-sftp-client/index.d.ts
vendored
@ -8,6 +8,7 @@
|
||||
// Taylor Herron <https://github.com/gbhmt>
|
||||
// Lane Goldberg <https://github.com/builtbylane>
|
||||
// Lorenzo Adinolfi <https://github.com/loru88>
|
||||
// Sam Galizia <https://github.com/sgalizia>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as ssh2 from 'ssh2';
|
||||
@ -18,19 +19,27 @@ export = sftp;
|
||||
declare class sftp {
|
||||
connect(options: ssh2.ConnectConfig): Promise<ssh2.SFTPWrapper>;
|
||||
|
||||
list(remoteFilePath: string, pattern?: string|RegExp): Promise<sftp.FileInfo[]>;
|
||||
list(remoteFilePath: string, pattern?: string | RegExp): Promise<sftp.FileInfo[]>;
|
||||
|
||||
exists(remotePath: string): Promise<false | "d" | "-" | "l">;
|
||||
exists(remotePath: string): Promise<false | 'd' | '-' | 'l'>;
|
||||
|
||||
stat(remotePath: string): Promise<sftp.FileStats>;
|
||||
|
||||
realPath(remotePath: string): Promise<string>;
|
||||
|
||||
get(path: string, dst?: string | NodeJS.ReadableStream, options?: ssh2Stream.TransferOptions): Promise<string | NodeJS.ReadableStream | Buffer>;
|
||||
get(
|
||||
path: string,
|
||||
dst?: string | NodeJS.WritableStream,
|
||||
options?: ssh2Stream.TransferOptions,
|
||||
): Promise<string | NodeJS.WritableStream | Buffer>;
|
||||
|
||||
fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise<string>;
|
||||
|
||||
put(input: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, options?: ssh2Stream.TransferOptions): Promise<string>;
|
||||
put(
|
||||
input: string | Buffer | NodeJS.ReadableStream,
|
||||
remoteFilePath: string,
|
||||
options?: ssh2Stream.TransferOptions,
|
||||
): Promise<string>;
|
||||
|
||||
fastPut(localPath: string, remoteFilePath: string, options?: ssh2Stream.TransferOptions): Promise<string>;
|
||||
|
||||
@ -46,7 +55,11 @@ declare class sftp {
|
||||
|
||||
chmod(remotePath: string, mode: number | string): Promise<string>;
|
||||
|
||||
append(input: Buffer | NodeJS.ReadableStream, remotePath: string, options?: ssh2Stream.TransferOptions): Promise<string>;
|
||||
append(
|
||||
input: Buffer | NodeJS.ReadableStream,
|
||||
remotePath: string,
|
||||
options?: ssh2Stream.TransferOptions,
|
||||
): Promise<string>;
|
||||
|
||||
end(): Promise<void>;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user