Update origin argument type

This commit is contained in:
Dmitri Moore 2018-03-13 09:01:54 -07:00
parent 5dc41ce74c
commit ff7921476c

View File

@ -2,7 +2,7 @@
// Project: https://github.com/koajs/cors
// Definitions by: Xavier Stouder <https://github.com/Xstoudi>, Izayoi Ko <https://github.com/izayoiko>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 2.4
import * as Koa from "koa";
@ -11,7 +11,7 @@ export = cors;
declare namespace cors {
interface Options {
origin?: ((req: Koa.Request) => string) | string;
origin?: ((ctx: Koa.Context) => string) | string;
allowMethods?: string[] | string;
exposeHeaders?: string[] | string;
allowHeaders?: string[] | string;