From b59dee51308fa0d8e1979ea4504356790f8c4d14 Mon Sep 17 00:00:00 2001 From: Daniel Hritzkiv Date: Thu, 14 Sep 2017 13:45:04 -0400 Subject: [PATCH] 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` --- types/mime/index.d.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/types/mime/index.d.ts b/types/mime/index.d.ts index 7debcca6f3..4024ac0589 100644 --- a/types/mime/index.d.ts +++ b/types/mime/index.d.ts @@ -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 // 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;