From 3af50bd79b5884e9827f1f99443d44649027a3eb Mon Sep 17 00:00:00 2001 From: Izayoi Ko Date: Fri, 24 Mar 2017 01:33:01 +0800 Subject: [PATCH 1/2] kcors: Fix options type --- kcors/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kcors/index.d.ts b/kcors/index.d.ts index e2618f63cb..6198909d22 100644 --- a/kcors/index.d.ts +++ b/kcors/index.d.ts @@ -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; From ae2748ed007d8850c7c400d3a5cf4168335f877a Mon Sep 17 00:00:00 2001 From: Izayoi Ko Date: Fri, 24 Mar 2017 01:51:48 +0800 Subject: [PATCH 2/2] kcors: Update "Definitions by" section --- kcors/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kcors/index.d.ts b/kcors/index.d.ts index 6198909d22..e4e9e53fa6 100644 --- a/kcors/index.d.ts +++ b/kcors/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for kcors 2.2 // Project: https://github.com/koajs/cors -// Definitions by: Xavier Stouder +// Definitions by: Xavier Stouder , Izayoi Ko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Koa from "koa";