@types/s3rver
TypeScript icon, indicating that this package has built-in type declarations

3.7.4 • Public • Published

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.

index.d.ts

/// <reference types="node" />

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/s3rver

Weekly Downloads

30,058

Version

3.7.4

License

MIT

Unpacked Size

5.67 kB

Total Files

5

Last publish

Collaborators

  • types