@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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/micro-cors

Weekly Downloads

22,580

Version

0.1.5

License

MIT

Unpacked Size

3.69 kB

Total Files

5

Last publish

Collaborators

  • types