From 3fdc528f7331887c600585f345bf7daa67c4b566 Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 27 Oct 2016 14:23:26 +0900 Subject: [PATCH] export types of content-type --- content-type/content-type-tests.ts | 2 ++ content-type/index.d.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/content-type/content-type-tests.ts b/content-type/content-type-tests.ts index 0e5eb2c048..f173a1efbb 100644 --- a/content-type/content-type-tests.ts +++ b/content-type/content-type-tests.ts @@ -15,3 +15,5 @@ obj = contentType.parse(res); var str: string = contentType.format({type: 'image/svg+xml'}); +var media: contentType.MediaType; +contentType.format(media); diff --git a/content-type/index.d.ts b/content-type/index.d.ts index 0095367565..3dd39182f4 100644 --- a/content-type/index.d.ts +++ b/content-type/index.d.ts @@ -3,10 +3,10 @@ // Definitions by: Hiroki Horiuchi // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare var x: ContentType.StaticFunctions; -export = x; +declare var ct: ct.StaticFunctions; +export = ct; -declare namespace ContentType { +declare namespace ct { interface StaticFunctions { parse(string: string): MediaType; parse(req: { headers: any; }): MediaType;