2.0.5 • Published 6 months ago
@types/koa2-cors v2.0.5
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.
index.d.ts
// Type definitions for koa2-cors 2.0
// Project: https://github.com/zadzbw/koa2-cors#readme
// Definitions by: xialeistudio <https://github.com/xialeistudio>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
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: Thu, 08 Jul 2021 16:23:26 GMT
- Dependencies: @types/koa
- Global values: none
Credits
These definitions were written by xialeistudio.