mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* rename the definition file of another `content-type` library * add the definition of `content-type` library
25 lines
670 B
TypeScript
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;
|
|
}
|
|
|