1.1.8 • Published 2 years ago

@types/content-type v1.1.8

Weekly downloads
135,751
License
MIT
Repository
github
Last release
2 years ago

Installation

npm install --save @types/content-type

Summary

This package contains type definitions for content-type (https://github.com/jshttp/content-type).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/content-type.

index.d.ts

// Type definitions for content-type 1.1
// Project: https://github.com/jshttp/content-type
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi>
//                 BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export function parse(input: RequestLike | ResponseLike | string): ParsedMediaType;
export function format(obj: MediaType): string;

export interface ParsedMediaType {
    type: string;
    parameters: {[key: string]: string};
}

export interface MediaType {
    type: string;
    parameters?: {[key: string]: string} | undefined;
}

export interface RequestLike {
    headers: {[header: string]: string | string[] | undefined};
}

export interface ResponseLike {
    getHeader(name: string): number | string | string[] | undefined;
}

Additional Details

  • Last updated: Fri, 09 Jul 2021 02:32:23 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Hiroki Horiuchi, and BendingBender.

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

7 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.33

9 years ago

1.0.32

9 years ago

1.0.31

9 years ago

1.0.30

9 years ago

1.0.29

9 years ago

0.0.28

9 years ago

0.0.27-alpha

9 years ago

0.0.26-alpha

9 years ago

0.0.25-alpha

9 years ago

0.0.24-alpha

9 years ago

0.0.23-alpha

9 years ago

0.0.22-alpha

9 years ago

0.0.21-alpha

9 years ago

0.0.16-alpha

9 years ago

0.0.15-alpha

9 years ago