# @types/micro-cors

> TypeScript definitions for micro-cors

Latest version **0.1.6** (published 2025-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/micro-cors
pnpm add @types/micro-cors
yarn add @types/micro-cors
bun add @types/micro-cors
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2025-11-21 |
| First published | 2018-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/micro-cors
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/micro-cors
- npm.io page: https://npm.io/package/@types/micro-cors

## Dependencies (1)

- [@types/micro](https://npm.io/package/@types/micro.md) ^7.3.7

## Recent versions

- 0.1.6 (latest) — 2025-11-21
- 0.1.5 (ts4.5) — 2023-11-07
- 0.1.3 (ts4.2) — 2023-02-09
- 0.1.2 (ts3.6) — 2021-07-08
- 0.1.1 (ts2.9) — 2020-05-12
- 0.1.0 (ts2.2) — 2018-06-30
- 0.1.4 — 2023-10-18

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/micro-cors/index.d.ts)
````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: Fri, 21 Nov 2025 20:02:07 GMT
 * Dependencies: [@types/micro](https://npmjs.com/package/@types/micro)

# Credits
These definitions were written by [ChanYong Moon](https://github.com/moonchanyong).

---
_Source: https://npm.io/package/@types/micro-cors · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
