Merge pull request #12286 from DefinitelyTyped/feat-content-type

export types of content-type
This commit is contained in:
Horiuchi_H
2016-10-27 16:15:25 +09:00
committed by GitHub
2 changed files with 5 additions and 3 deletions
+2
View File
@@ -15,3 +15,5 @@ obj = contentType.parse(res);
var str: string = contentType.format({type: 'image/svg+xml'});
var media: contentType.MediaType;
contentType.format(media);
+3 -3
View File
@@ -3,10 +3,10 @@
// Definitions by: Hiroki Horiuchi <https://github.com/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;