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;