DefinitelyTyped/content-type/content-type.d.ts
Horiuchi_H a15f083327 Add Content type definition (#6381)
* rename the definition file of another `content-type` library

* add the definition of `content-type` library
2016-06-29 23:20:31 +09:00

25 lines
670 B
TypeScript

// Type definitions for content-type v1.0.1
// Project: https://www.npmjs.com/package/content-type
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module ContentType {
interface StaticFunctions {
parse(string: string): MediaType;
parse(req: { headers: any; }): MediaType;
parse(res: { getHeader(key: string): string; }): MediaType;
format(obj: MediaType): string;
}
interface MediaType {
type: string;
parameters?: any;
}
}
declare module "content-type" {
var x: ContentType.StaticFunctions;
export = x;
}