Skip to content

Commit e8efe32

Browse files
authored
fix: add errors to typescript declarations (#337)
fixes #336
1 parent 18277e9 commit e8efe32

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

ftp-srv.d.ts

+32
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,38 @@ export class FileSystem {
4141
getUniqueName(fileName: string): string;
4242
}
4343

44+
export class GeneralError extends Error {
45+
/**
46+
* @param message The error message.
47+
* @param code Default value is `400`.
48+
*/
49+
constructor(message: string, code?: number);
50+
}
51+
52+
export class SocketError extends Error {
53+
/**
54+
* @param message The error message.
55+
* @param code Default value is `500`.
56+
*/
57+
constructor(message: string, code?: number);
58+
}
59+
60+
export class FileSystemError extends Error {
61+
/**
62+
* @param message The error message.
63+
* @param code Default value is `400`.
64+
*/
65+
constructor(message: string, code?: number);
66+
}
67+
68+
export class ConnectorError extends Error {
69+
/**
70+
* @param message The error message.
71+
* @param code Default value is `400`.
72+
*/
73+
constructor(message: string, code?: number);
74+
}
75+
4476
export class FtpConnection extends EventEmitter {
4577
server: FtpServer;
4678
id: string;

0 commit comments

Comments
 (0)