@types/koa-cors
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Installation

npm install --save @types/koa-cors

Summary

This package contains type definitions for koa-cors (https://github.com/evert0n/koa-cors).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-cors.

index.d.ts

// Type definitions for koa-cors 0.0
// Project: https://github.com/evert0n/koa-cors
// Definitions by: Romain Faust <https://github.com/romain-faust>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import { Context, Middleware, Request } from 'koa';

declare function koaCors(options?: koaCors.Options): Middleware;

declare namespace koaCors {
    interface Options {
        credentials?: true | ((ctx: Context) => boolean) | undefined;
        expose?: string | ReadonlyArray<string> | undefined;
        headers?: string | ReadonlyArray<string> | undefined;
        maxAge?: number | undefined;
        methods?: string | ReadonlyArray<string> | undefined;
        origin?: boolean | string | ((request: Request) => string) | undefined;
    }
}

export = koaCors;

Additional Details

  • Last updated: Tue, 20 Jul 2021 18:01:29 GMT
  • Dependencies: @types/koa
  • Global values: none

Credits

These definitions were written by Romain Faust.

Keywords

none

Install

npm i @types/koa-cors

DownloadsWeekly Downloads

6,585

Version

0.0.2

License

MIT

Unpacked Size

4.27 kB

Total Files

4

Last publish

Collaborators

  • types