Merge pull request #15340 from izayoiko/patch-1

kcors: Fix options type
This commit is contained in:
Paul van Brenk
2017-03-23 14:14:10 -07:00
committed by GitHub

6
kcors/index.d.ts vendored
View File

@@ -1,6 +1,6 @@
// Type definitions for kcors 2.2
// Project: https://github.com/koajs/cors
// Definitions by: Xavier Stouder <https://github.com/Xstoudi>
// Definitions by: Xavier Stouder <https://github.com/Xstoudi>, Izayoi Ko <https://github.com/izayoiko>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as Koa from "koa";
@@ -10,10 +10,10 @@ export = cors;
declare namespace cors {
interface Options {
origin?: (req: Koa.Request) => string | string;
origin?: ((req: Koa.Request) => string) | string;
allowMethods?: string[] | string;
exposeHeaders?: string[] | string;
allowHeaders: string[] | string;
allowHeaders?: string[] | string;
maxAge?: number | string;
credentials?: boolean;
keepHeadersOnError?: boolean;