1/// <reference types="node" /> 2 3interface MIMEType { 4 type: string 5 subtype: string 6 parameters: Map<string, string> 7 essence: string 8} 9 10/** 11 * Parse a string to a {@link MIMEType} object. Returns `failure` if the string 12 * couldn't be parsed. 13 * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type 14 */ 15export function parseMIMEType (input: string): 'failure' | MIMEType 16 17/** 18 * Convert a MIMEType object to a string. 19 * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type 20 */ 21export function serializeAMimeType (mimeType: MIMEType): string 22