Installation
npm install --save @types/s3rver
Summary
This package contains type definitions for s3rver (https://github.com/jamhall/s3rver).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/s3rver.
import { IncomingMessage, ServerResponse } from "http";
import { Http2ServerRequest, Http2ServerResponse } from "http2";
import { AddressInfo } from "net";
declare class S3rver {
constructor(options: S3rverOptions);
run(): Promise<AddressInfo>;
run(callback: (error: Error | null, address: AddressInfo) => void): this;
close(): Promise<void>;
close(callback: (error?: Error) => void): this;
callback(): (req: IncomingMessage | Http2ServerRequest, res: ServerResponse | Http2ServerResponse) => void;
getMiddleware(): (req: IncomingMessage | Http2ServerRequest, res: ServerResponse | Http2ServerResponse) => void;
configureBuckets(): Promise<void>;
reset(): void;
}
interface S3rverOptions {
address?: string | undefined;
port?: number | undefined;
key?: string | Buffer | undefined;
cert?: string | Buffer | undefined;
silent?: boolean | undefined;
serviceEndpoint?: string | undefined;
directory?: string | undefined;
resetOnClose?: boolean | undefined;
allowMismatchedSignatures?: boolean | undefined;
vhostBuckets?: boolean | undefined;
configureBuckets?: readonly S3rverBucketConfig[] | undefined;
}
interface S3rverBucketConfig {
name: string;
configs: ReadonlyArray<string | Buffer>;
}
export = S3rver;
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:24 GMT
- Dependencies: @types/node
Credits
These definitions were written by David Broder-Rodgers, F. Eugene Aumson, and Trygve Aaberge.