# @types/mime-types

> TypeScript definitions for mime-types

Latest version **3.0.1** (published 2025-06-07) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 55/100 (C)** — status: stable.

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

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2025-06-07 |
| First published | 2017-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51430 |
| Maintainers | types |

## Links

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

## Recent versions

- 3.0.1 (latest) — 2025-06-07
- 2.1.4 (ts4.7) — 2023-11-07
- 2.1.1 (ts3.6) — 2021-08-16
- 2.1.0 (ts2.6) — 2017-04-18
- 3.0.0 — 2025-05-30
- 2.1.3 — 2023-10-18
- 2.1.2 — 2023-09-27

## README

# Installation
> `npm install --save @types/mime-types`

# Summary
This package contains type definitions for mime-types (https://github.com/jshttp/mime-types#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime-types.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime-types/index.d.ts)
````ts
export function lookup(filenameOrExt: string): string | false;

export function contentType(filenameOrExt: string): string | false;

export function extension(typeString: string): string | false;

export function charset(typeString: string): string | false;

export namespace charsets {
    const lookup: typeof charset;
}

export const types: { [key: string]: string };

export const extensions: { [key: string]: string[] };

````

### Additional Details
 * Last updated: Sat, 07 Jun 2025 02:15:25 GMT
 * Dependencies: none

# Credits
These definitions were written by [Gyusun Yeom](https://github.com/Perlmint), and [Sebastian Beltran](https://github.com/bjohansebas).

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