@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.

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.5
    3,687
  • 2.0.4
    20
  • 2.0.3
    95
  • 2.0.2
    1,611
  • 2.0.1
    747
  • 2.0.0
    0

Package Sidebar

Install

npm i @types/koa2-cors

Weekly Downloads

4,999

Version

2.0.5

License

MIT

Unpacked Size

3.55 kB

Total Files

5

Last publish

Collaborators

  • types