Skip to content

Commit

Permalink
fix: add errors to typescript declarations (#337)
Browse files Browse the repository at this point in the history
fixes #336
  • Loading branch information
paulober authored Oct 3, 2023
1 parent 18277e9 commit e8efe32
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ftp-srv.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e8efe32

Please sign in to comment.