# @types/mime-db

> TypeScript definitions for mime-db

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

## Install

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

## 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 | 1.43.6 |
| Published | 2025-06-07 |
| First published | 2017-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51444 |
| Maintainers | types |

## Links

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

## Recent versions

- 1.43.6 (latest) — 2025-06-07
- 1.43.5 (ts5.0) — 2023-11-21
- 1.43.1 (ts4.3) — 2021-07-06
- 1.43.0 (ts3.5) — 2020-04-24
- 1.27.0 (ts2.6) — 2017-05-15
- 1.43.4 — 2023-11-07
- 1.43.3 — 2023-10-18
- 1.43.2 — 2023-09-27
- 1.27.1 — 2020-03-30

## README

# Installation
> `npm install --save @types/mime-db`

# Summary
This package contains type definitions for mime-db (https://github.com/jshttp/mime-db).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime-db.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime-db/index.d.ts)
````ts
declare namespace database {
    /**
     * @see {@link https://github.com/jshttp/mime-db#data-structure}
     */
    interface MimeEntry {
        /**
         * Where the mime type is defined.
         * If not set, it's probably a custom media type.
         */
        readonly source?: MimeSource | undefined;
        /** Known extensions associated with this mime type. */
        readonly extensions?: readonly string[] | undefined;
        /** Whether a file of this type can be gzipped. */
        readonly compressible?: boolean | undefined;
        /** The default charset associated with this type, if any. */
        readonly charset?: string | undefined;
    }

    /**
     * @see {@link https://github.com/jshttp/mime-db#data-structure}
     */
    interface MimeDatabase {
        readonly [type: string]: MimeEntry;
    }

    /**
     * Sources:
     * http://www.iana.org/assignments/media-types/media-types.xhtml
     * http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
     * http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
     */
    type MimeSource = "iana" | "apache" | "nginx";
}

declare const database: database.MimeDatabase;

export = database;

````

### Additional Details
 * Last updated: Sat, 07 Jun 2025 02:15:25 GMT
 * Dependencies: none

# Credits
These definitions were written by [AJP](https://github.com/AJamesPhillips), [Linus Unnebäck](https://github.com/LinusU), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Sebastian Beltran](https://github.com/bjohansebas).

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