-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from trs/add-typings
feat(typings): add TypeScript .d.ts files
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters