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

0.0.6 • 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

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 | readonly string[] | undefined;
        headers?: string | readonly string[] | undefined;
        maxAge?: number | undefined;
        methods?: string | readonly string[] | undefined;
        origin?: boolean | string | ((request: Request) => string) | undefined;
    }
}

export = koaCors;

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: @types/koa

Credits

These definitions were written by Romain Faust.

Dependents (5)

Package Sidebar

Install

npm i @types/koa-cors

Weekly Downloads

9,646

Version

0.0.6

License

MIT

Unpacked Size

3.73 kB

Total Files

5

Last publish

Collaborators

  • types