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

0.1.5 • Public • Published

Installation

npm install --save @types/micro-cors

Summary

This package contains type definitions for micro-cors (https://github.com/possibilities/micro-cors#readme).

Details

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

index.d.ts

import { RequestHandler } from "micro";

interface Options {
    maxAge?: number | undefined;
    origin?: string | undefined;
    allowHeaders?: string[] | undefined;
    allowMethods?: string[] | undefined;
    exposeHeaders?: string[] | undefined;
    allowCredentials?: boolean | undefined;
}

declare function micro_cors(options?: Options): (handler: RequestHandler) => RequestHandler;

export = micro_cors;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/micro

Credits

These definitions were written by Callum Denby, and ChanYong Moon.

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.5
    8,261
  • 0.1.4
    47
  • 0.1.3
    11,864
  • 0.1.2
    4,563
  • 0.1.1
    83
  • 0.1.0
    40

Package Sidebar

Install

npm i @types/micro-cors

Weekly Downloads

24,858

Version

0.1.5

License

MIT

Unpacked Size

3.69 kB

Total Files

5

Last publish

Collaborators

  • types