mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 20:21:46 +00:00
Unwrap all lone ambient external modules
This commit is contained in:
+30
-31
@@ -3,36 +3,35 @@
|
||||
// Definitions by: MIZUNE Pine <https://github.com/pine613>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module "http-string-parser" {
|
||||
interface ParseRequestResult {
|
||||
method: string;
|
||||
uri: string;
|
||||
headers: { [key: string]: string };
|
||||
body: string;
|
||||
}
|
||||
|
||||
interface ParseResponseResult {
|
||||
statusCode: string;
|
||||
statusMessage: string;
|
||||
headers: { [key: string]: string };
|
||||
body: string;
|
||||
}
|
||||
|
||||
interface ParseRequestLineResult {
|
||||
method: string;
|
||||
uri: string;
|
||||
protocol: string;
|
||||
}
|
||||
|
||||
interface ParseStatusLineResult {
|
||||
protocol: string;
|
||||
statusCode: string;
|
||||
statusMessage: string;
|
||||
}
|
||||
|
||||
export function parseRequest(requestString: string): ParseRequestResult;
|
||||
export function parseResponse(responseString: string): ParseResponseResult;
|
||||
export function parseRequestLine(requestLineString: string): ParseRequestLineResult;
|
||||
export function parseStatusLine(statusLine: string): ParseStatusLineResult;
|
||||
export function parseHeaders(headerLines: string[]): { [key: string]: string };
|
||||
interface ParseRequestResult {
|
||||
method: string;
|
||||
uri: string;
|
||||
headers: { [key: string]: string };
|
||||
body: string;
|
||||
}
|
||||
|
||||
interface ParseResponseResult {
|
||||
statusCode: string;
|
||||
statusMessage: string;
|
||||
headers: { [key: string]: string };
|
||||
body: string;
|
||||
}
|
||||
|
||||
interface ParseRequestLineResult {
|
||||
method: string;
|
||||
uri: string;
|
||||
protocol: string;
|
||||
}
|
||||
|
||||
interface ParseStatusLineResult {
|
||||
protocol: string;
|
||||
statusCode: string;
|
||||
statusMessage: string;
|
||||
}
|
||||
|
||||
declare export function parseRequest(requestString: string): ParseRequestResult;
|
||||
declare export function parseResponse(responseString: string): ParseResponseResult;
|
||||
declare export function parseRequestLine(requestLineString: string): ParseRequestLineResult;
|
||||
declare export function parseStatusLine(statusLine: string): ParseStatusLineResult;
|
||||
declare export function parseHeaders(headerLines: string[]): { [key: string]: string };
|
||||
|
||||
Reference in New Issue
Block a user