[promise-sftp] Return array from list() (#37738)

This commit is contained in:
Valentin Agachi
2019-08-19 11:24:20 -07:00
committed by Sheetal Nandi
parent ac96b67e36
commit fff503732c
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -234,10 +234,10 @@ declare class PromiseSftp {
* Retrieves a directory listing.
* @param path - The path of the directory to get the listing of.
*/
list(path?: string): Promise<PromiseSftp.DirectoryListing>;
list(path?: string): Promise<PromiseSftp.DirectoryListing[]>;
/** Alias to `#list()` */
listSafe(path: string): Promise<PromiseSftp.DirectoryListing>;
listSafe(path: string): Promise<PromiseSftp.DirectoryListing[]>;
/**
* Retrieve a file from the server.
+3
View File
@@ -5,5 +5,8 @@ const sftp = new PromiseSftp();
// $ExpectType () => boolean
sftp.destroy;
// $ExpectType Bluebird<DirectoryListing[]>
sftp.list();
// $ExpectType typeof STATUSES
PromiseSftp.STATUSES;