mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Merge pull request #12286 from DefinitelyTyped/feat-content-type
export types of content-type
This commit is contained in:
@@ -15,3 +15,5 @@ obj = contentType.parse(res);
|
||||
|
||||
var str: string = contentType.format({type: 'image/svg+xml'});
|
||||
|
||||
var media: contentType.MediaType;
|
||||
contentType.format(media);
|
||||
|
||||
Vendored
+3
-3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user