UNPKG

1.27 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/mime-types`
3
4# Summary
5This package contains type definitions for mime-types (https://github.com/jshttp/mime-types#readme).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime-types.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime-types/index.d.ts)
10````ts
11// Type definitions for mime-types 2.1
12// Project: https://github.com/jshttp/mime-types#readme
13// Definitions by: Gyusun Yeom <https://github.com/Perlmint>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15
16export function lookup(filenameOrExt: string): string | false;
17export function contentType(filenameOrExt: string): string | false;
18export function extension(typeString: string): string | false;
19export function charset(typeString: string): string | false;
20export namespace charsets {
21 const lookup: typeof charset;
22}
23export const types: {[key: string]: string};
24export const extensions: {[key: string]: string[]};
25
26````
27
28### Additional Details
29 * Last updated: Mon, 16 Aug 2021 19:31:26 GMT
30 * Dependencies: none
31 * Global values: none
32
33# Credits
34These definitions were written by [Gyusun Yeom](https://github.com/Perlmint).
35
\No newline at end of file