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

1.0.7 • Public • Published

Installation

npm install --save @types/koa-proxy

Summary

This package contains type definitions for koa-proxy (https://github.com/edorivai/koa-proxy#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-proxy.

index.d.ts

import * as Koa from "koa";

declare namespace proxy {
    type RequestOptionFunc = (request: Koa.Request, opts: any) => any;

    interface IndexedObject {
        [key: string]: string;
    }

    type MapFunction = (path: string) => string;

    interface Options {
        host?: string;
        encoding?: string | null;
        url?: string;
        map?: IndexedObject | MapFunction;
        match?: RegExp;
        jar?: boolean;
        suppressRequestHeaders?: string[]; // case-insensitive
        suppressResponseHeaders?: string[]; // case-insensitive
        overrideResponseHeaders?: any;
        requestOptions?: RequestOptionFunc | IndexedObject;
        followRedirect?: boolean;
        yieldNext?: boolean;
    }
}

declare function proxy(options?: proxy.Options): Koa.Middleware;

export = proxy;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: @types/koa

Credits

These definitions were written by .

Readme

Keywords

none

Package Sidebar

Install

npm i @types/koa-proxy

Weekly Downloads

1,509

Version

1.0.7

License

MIT

Unpacked Size

4.06 kB

Total Files

5

Last publish

Collaborators

  • types