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

2.0.5 • Public • Published

Installation

npm install --save @types/koa2-cors

Summary

This package contains type definitions for koa2-cors (https://github.com/zadzbw/koa2-cors#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa2-cors.

index.d.ts

import * as Koa from "koa";
declare namespace cors {
    interface Options {
        origin?: string | ((ctx: Koa.Context) => boolean | string) | undefined;
        exposeHeaders?: string[] | undefined;
        maxAge?: number | undefined;
        credentials?: boolean | undefined;
        allowMethods?: string[] | undefined;
        allowHeaders?: string[] | undefined;
    }
}

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

export = cors;

Additional Details

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

Credits

These definitions were written by xialeistudio.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/koa2-cors

Weekly Downloads

4,219

Version

2.0.5

License

MIT

Unpacked Size

3.55 kB

Total Files

5

Last publish

Collaborators

  • types