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