-
Notifications
You must be signed in to change notification settings - Fork 29.9k
/
index.d.ts
37 lines (33 loc) · 1.18 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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;