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.