forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
s3rver.d.ts
32 lines (27 loc) · 1 KB
/
s3rver.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Type definitions for S3rver
// Project: https://github.com/jamhall/s3rver
// Definitions by: David Broder-Rodgers <https://github.com/DavidBR-SW/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "s3rver" {
import * as http from "http";
class S3rver {
constructor(options: S3rverOptions)
setPort(port: number): S3rver;
setHostname(hostname: string): S3rver;
setDirectory(directory: string): S3rver;
setSilent(silent: boolean): S3rver;
setIndexDocument(indexDocument: string): S3rver;
setErrorDocument(errorDocument: string): S3rver;
run(callback: (error: Error, hostname: string, port: number, directory: string) => void): http.Server;
}
interface S3rverOptions {
port?: number;
hostname?: string;
silent?: boolean;
indexDocument?: string;
errorDocument?: string;
directory: string;
}
export = S3rver;
}