From f0795a3470f96fe20ed3bde5a05f1048f7337601 Mon Sep 17 00:00:00 2001 From: Abdessamad MOUHASSINE Date: Sat, 25 Nov 2017 12:22:20 +0000 Subject: [PATCH 1/2] Add missing exports Add `normalize` and `match` functions --- types/type-is/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/type-is/index.d.ts b/types/type-is/index.d.ts index 93c70aa4a3..e3dd9da1fc 100644 --- a/types/type-is/index.d.ts +++ b/types/type-is/index.d.ts @@ -13,7 +13,9 @@ declare function typeIs(request: IncomingMessage, types: string[]): string | fal declare function typeIs(request: IncomingMessage, ...types: string[]): string | false | null; declare namespace typeIs { + function normalize (type: string): string | false; function hasBody(request: IncomingMessage): boolean; function is(mediaType: string, types: string[]): string | false; function is(mediaType: string, ...types: string[]): string | false; + function mimeMatch (expected: false | string, actual: string): boolean; } From e6862574f957bd1e5400f670d41db011bf0ce8f8 Mon Sep 17 00:00:00 2001 From: Abdessamad MOUHASSINE Date: Sat, 25 Nov 2017 13:07:40 +0000 Subject: [PATCH 2/2] Fix tslint issue --- types/type-is/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/type-is/index.d.ts b/types/type-is/index.d.ts index e3dd9da1fc..9fffd0bb9a 100644 --- a/types/type-is/index.d.ts +++ b/types/type-is/index.d.ts @@ -13,9 +13,9 @@ declare function typeIs(request: IncomingMessage, types: string[]): string | fal declare function typeIs(request: IncomingMessage, ...types: string[]): string | false | null; declare namespace typeIs { - function normalize (type: string): string | false; + function normalize(type: string): string | false; function hasBody(request: IncomingMessage): boolean; function is(mediaType: string, types: string[]): string | false; function is(mediaType: string, ...types: string[]): string | false; - function mimeMatch (expected: false | string, actual: string): boolean; + function mimeMatch(expected: false | string, actual: string): boolean; }