mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Update return types of list, listSafe to also return array of strings (#37992)
This commit is contained in:
parent
67544cef20
commit
ec7c6ded2a
9
types/promise-ftp/index.d.ts
vendored
9
types/promise-ftp/index.d.ts
vendored
@ -1,6 +1,7 @@
|
||||
// Type definitions for promise-ftp 1.3
|
||||
// Project: https://github.com/realtymaps/promise-ftp
|
||||
// Definitions by: coolreader18 <https://github.com/coolreader18>
|
||||
// Rolands Jegorovs <https://github.com/Rolandisimo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.2
|
||||
|
||||
@ -88,8 +89,8 @@ declare class PromiseFtp {
|
||||
* @param useCompression - defaults to false.
|
||||
* @returns the contents of the specified directory
|
||||
*/
|
||||
list(path?: string, useCompression?: boolean): Promise<FtpClient.ListingElement[]>;
|
||||
list(useCompression: boolean): Promise<FtpClient.ListingElement[]>;
|
||||
list(path?: string, useCompression?: boolean): Promise<Array<FtpClient.ListingElement | string>>;
|
||||
list(useCompression: boolean): Promise<Array<FtpClient.ListingElement | string>>;
|
||||
|
||||
/**
|
||||
* Optional "standard" commands (RFC 959)
|
||||
@ -106,8 +107,8 @@ declare class PromiseFtp {
|
||||
listSafe(
|
||||
path?: string,
|
||||
useCompression?: boolean
|
||||
): FtpClient.ListingElement[];
|
||||
listSafe(useCompression: boolean): Promise<FtpClient.ListingElement[]>;
|
||||
): Promise<Array<FtpClient.ListingElement | string>>;
|
||||
listSafe(useCompression: boolean): Promise<Array<FtpClient.ListingElement | string>>;
|
||||
|
||||
/**
|
||||
* Retrieve a file at path from the server.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user