From 575b41e039e6111eb27a7b6dd1e9b5bb182aa46d Mon Sep 17 00:00:00 2001 From: paulober <44974737+paulober@users.noreply.github.com> Date: Tue, 30 Aug 2022 11:32:37 +0200 Subject: [PATCH] Fix #336, Added errors to typescript declarations --- ftp-srv.d.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/ftp-srv.d.ts b/ftp-srv.d.ts index b14b113..4b3231f 100644 --- a/ftp-srv.d.ts +++ b/ftp-srv.d.ts @@ -41,6 +41,38 @@ export class FileSystem { getUniqueName(fileName: string): string; } +export class GeneralError extends Error { + /** + * @param message The error message. + * @param code Default value is `400`. + */ + constructor(message: string, code?: number); +} + +export class SocketError extends Error { + /** + * @param message The error message. + * @param code Default value is `500`. + */ + constructor(message: string, code?: number); +} + +export class FileSystemError extends Error { + /** + * @param message The error message. + * @param code Default value is `400`. + */ + constructor(message: string, code?: number); +} + +export class ConnectorError extends Error { + /** + * @param message The error message. + * @param code Default value is `400`. + */ + constructor(message: string, code?: number); +} + export class FtpConnection extends EventEmitter { server: FtpServer; id: string;