UNPKG

627 BTypeScriptView Raw
1// Type definitions for mime 2.0
2// Project: https://github.com/broofa/node-mime
3// Definitions by: Jeff Goddard <https://github.com/jedigo>
4// Daniel Hritzkiv <https://github.com/dhritzkiv>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
7// Originally imported from: https://github.com/soywiz/typescript-node-definitions/mime.d.ts
8
9export as namespace mime;
10
11export interface TypeMap { [key: string]: string[]; }
12
13export function getType(path: string): string | null;
14export function getExtension(mime: string): string | null;
15export function define(mimes: TypeMap, force?: boolean): void;