mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
22 lines
622 B
TypeScript
22 lines
622 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 var ct: ct.StaticFunctions;
|
|
export = ct;
|
|
|
|
declare namespace ct {
|
|
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;
|
|
}
|
|
}
|