mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[promise-sftp] Return array from list() (#37738)
This commit is contained in:
committed by
Sheetal Nandi
parent
ac96b67e36
commit
fff503732c
Vendored
+2
-2
@@ -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.
|
||||
|
||||
@@ -5,5 +5,8 @@ const sftp = new PromiseSftp();
|
||||
// $ExpectType () => boolean
|
||||
sftp.destroy;
|
||||
|
||||
// $ExpectType Bluebird<DirectoryListing[]>
|
||||
sftp.list();
|
||||
|
||||
// $ExpectType typeof STATUSES
|
||||
PromiseSftp.STATUSES;
|
||||
|
||||
Reference in New Issue
Block a user