Update index.d.ts

[Changes:](https://github.com/broofa/node-mime/blob/master/CHANGELOG.md)

- lookup() renamed to getType()
- extension() renamed to getExtension()
- charset() and load() methods have been removed

Corrected `getType` arguments (there's no fallback), and added `force` to `define`
This commit is contained in:
Daniel Hritzkiv
2017-09-14 13:45:04 -04:00
committed by GitHub
parent acc37d8b9d
commit b59dee5130

13
types/mime/index.d.ts vendored
View File

@@ -1,4 +1,4 @@
// Type definitions for mime 1.3
// Type definitions for mime 2.0
// Project: https://github.com/broofa/node-mime
// Definitions by: Jeff Goddard <https://github.com/jedigo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -7,13 +7,14 @@
export as namespace mime;
export function lookup(path: string, fallback?: string): string;
export function extension(mime: string): string;
export function load(filepath: string): void;
export function define(mimes: { [key: string]: any }): void;
export function getType(path: string): string;
export function getExtension(mime: string): string;
export function define(mimes: { [key: string]: string[] }, force?: boolean): void;
export interface Charsets {
lookup(mime: string): string;
getType(path: string): string;
getExtension(mime: string): string;
define(mimes: { [key: string]: string[] }, force?: boolean): void;
}
export const charsets: Charsets;