Merge pull request #34 from trs/add-typings
feat(typings): add TypeScript .d.ts files
This commit is contained in:
62
ftp-srv.d.ts
vendored
Normal file
62
ftp-srv.d.ts
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
declare class FileSystem {
|
||||
constructor(connection: any, {root, cwd}?: {
|
||||
root: any;
|
||||
cwd: any;
|
||||
});
|
||||
|
||||
currentDirectory(): string;
|
||||
|
||||
get(fileName: string): Promise<any>;
|
||||
|
||||
list(path?: string): Promise<any>;
|
||||
|
||||
chdir(path?: string): Promise<string>;
|
||||
|
||||
write(fileName: string, {append, start}?: {
|
||||
append?: boolean;
|
||||
start?: any;
|
||||
}): any;
|
||||
|
||||
read(fileName: string, {start}?: {
|
||||
start?: any;
|
||||
}): Promise<any>;
|
||||
|
||||
delete(path: string): Promise<any>;
|
||||
|
||||
mkdir(path: string): Promise<any>;
|
||||
|
||||
rename(from: string, to: string): Promise<any>;
|
||||
|
||||
chmod(path: string, mode: string): Promise<any>;
|
||||
|
||||
getUniqueName(): string;
|
||||
}
|
||||
|
||||
declare class FtpServer {
|
||||
constructor(url: string, options?: {});
|
||||
|
||||
readonly isTLS: boolean;
|
||||
|
||||
listen(): any;
|
||||
|
||||
emitPromise(action: any, ...data: any[]): Promise<any>;
|
||||
|
||||
emit(action: any, ...data: any[]): void;
|
||||
|
||||
setupTLS(_tls: boolean): boolean | {
|
||||
cert: string;
|
||||
key: string;
|
||||
ca: string
|
||||
};
|
||||
|
||||
setupGreeting(greet: string): string[];
|
||||
|
||||
setupFeaturesMessage(): string;
|
||||
|
||||
disconnectClient(id: string): Promise<any>;
|
||||
|
||||
close(): any;
|
||||
}
|
||||
|
||||
declare const FtpSrv: FtpServer;
|
||||
export default FtpServer;
|
||||
@@ -41,6 +41,7 @@
|
||||
"verify:js:watch": "chokidar 'src/**/*.js' 'test/**/*.js' 'config/**/*.js' -c 'npm run verify:js:fix' --initial --silent",
|
||||
"verify:watch": "npm run verify:js:watch --silent"
|
||||
},
|
||||
"types": "./ftp-srv.d.ts",
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "node_modules/cz-customizable"
|
||||
|
||||
Reference in New Issue
Block a user