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

2.2.8 • Public • Published

Installation

npm install --save @types/kcors

Summary

This package contains type definitions for kcors (https://github.com/koajs/cors).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/kcors.

index.d.ts

import * as Koa from "koa";

declare function cors(options?: cors.Options): Koa.Middleware;
export = cors;

declare namespace cors {
    interface Options {
        origin?: ((ctx: Koa.Context) => string) | string | undefined;
        allowMethods?: string[] | string | null | undefined;
        exposeHeaders?: string[] | string | undefined;
        allowHeaders?: string[] | string | undefined;
        maxAge?: number | string | undefined;
        credentials?: boolean | undefined;
        keepHeadersOnError?: boolean | undefined;
    }
}

Additional Details

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

Credits

These definitions were written by Xavier Stouder.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/kcors

Weekly Downloads

7,465

Version

2.2.8

License

MIT

Unpacked Size

3.66 kB

Total Files

5

Last publish

Collaborators

  • types