From fff503732c960dfa6370244e6c5f13ee0ce83ff2 Mon Sep 17 00:00:00 2001 From: Valentin Agachi Date: Mon, 19 Aug 2019 20:24:20 +0200 Subject: [PATCH] [promise-sftp] Return array from list() (#37738) --- types/promise-sftp/index.d.ts | 4 ++-- types/promise-sftp/promise-sftp-tests.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/promise-sftp/index.d.ts b/types/promise-sftp/index.d.ts index b434c37f92..1cca51c2a9 100644 --- a/types/promise-sftp/index.d.ts +++ b/types/promise-sftp/index.d.ts @@ -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; + list(path?: string): Promise; /** Alias to `#list()` */ - listSafe(path: string): Promise; + listSafe(path: string): Promise; /** * Retrieve a file from the server. diff --git a/types/promise-sftp/promise-sftp-tests.ts b/types/promise-sftp/promise-sftp-tests.ts index 90a46ab490..f4dc294201 100644 --- a/types/promise-sftp/promise-sftp-tests.ts +++ b/types/promise-sftp/promise-sftp-tests.ts @@ -5,5 +5,8 @@ const sftp = new PromiseSftp(); // $ExpectType () => boolean sftp.destroy; +// $ExpectType Bluebird +sftp.list(); + // $ExpectType typeof STATUSES PromiseSftp.STATUSES;