@types/request
Advanced tools
Comparing version 2.0.10 to 2.0.11
@@ -26,3 +26,3 @@ // Type definitions for request 2.0 | ||
declare namespace request { | ||
export interface RequestAPI<TRequest extends Request, TOptions extends CoreOptions, TUriUrlOptions> { | ||
interface RequestAPI<TRequest extends Request, TOptions extends CoreOptions, TUriUrlOptions> { | ||
defaults(options: TOptions): RequestAPI<TRequest, TOptions, RequiredUriUrl>; | ||
@@ -63,5 +63,5 @@ defaults(options: RequiredUriUrl & TOptions): DefaultUriUrlRequestApi<TRequest, TOptions, OptionalUriUrl>; | ||
initParams(uri: string, options?: TOptions, callback?: RequestCallback): TRequest; | ||
initParams(uri: string, callback?: RequestCallback): TRequest; | ||
initParams(options: TUriUrlOptions & TOptions, callback?: RequestCallback): TRequest; | ||
initParams(uri: string, options?: TOptions, callback?: RequestCallback): RequiredUriUrl & TOptions; | ||
initParams(uri: string, callback?: RequestCallback): RequiredUriUrl & TOptions; | ||
initParams(options: RequiredUriUrl & TOptions, callback?: RequestCallback): RequiredUriUrl & TOptions; | ||
@@ -175,17 +175,17 @@ forever(agentOptions: any, optionsArg: any): TRequest; | ||
} | ||
export type RequiredUriUrl = UriOptions | UrlOptions; | ||
type RequiredUriUrl = UriOptions | UrlOptions; | ||
export type OptionalUriUrl = RequiredUriUrl | {}; | ||
type OptionalUriUrl = RequiredUriUrl | {}; | ||
export type OptionsWithUri = UriOptions & CoreOptions; | ||
export type OptionsWithUrl = UrlOptions & CoreOptions; | ||
export type Options = OptionsWithUri | OptionsWithUrl; | ||
type OptionsWithUri = UriOptions & CoreOptions; | ||
type OptionsWithUrl = UrlOptions & CoreOptions; | ||
type Options = OptionsWithUri | OptionsWithUrl; | ||
export type RequestCallback = (error: any, response: RequestResponse, body: any) => void; | ||
type RequestCallback = (error: any, response: RequestResponse, body: any) => void; | ||
export type ResponseRequest = CoreOptions & { | ||
type ResponseRequest = CoreOptions & { | ||
uri: Url; | ||
}; | ||
export interface RequestResponse extends http.IncomingMessage { | ||
interface RequestResponse extends http.IncomingMessage { | ||
request: ResponseRequest; | ||
@@ -211,3 +211,3 @@ body: any; | ||
export interface HttpArchiveRequest { | ||
interface HttpArchiveRequest { | ||
url?: string; | ||
@@ -222,3 +222,3 @@ method?: string; | ||
export interface NameValuePair { | ||
interface NameValuePair { | ||
name: string; | ||
@@ -228,3 +228,3 @@ value: string; | ||
export interface Multipart { | ||
interface Multipart { | ||
chunked?: boolean; | ||
@@ -237,3 +237,3 @@ data?: Array<{ | ||
export interface RequestPart { | ||
interface RequestPart { | ||
headers?: Headers; | ||
@@ -243,3 +243,3 @@ body: any; | ||
export interface Request extends stream.Stream { | ||
interface Request extends stream.Stream { | ||
readable: boolean; | ||
@@ -264,3 +264,3 @@ writable: boolean; | ||
on(event: string, listener: Function): this; | ||
on(event: string, listener: (...args: any[]) => void): this; | ||
on(event: 'request', listener: (req: http.ClientRequest) => void): this; | ||
@@ -272,10 +272,8 @@ on(event: 'response', listener: (resp: http.IncomingMessage) => void): this; | ||
write(buffer: Buffer, cb?: Function): boolean; | ||
write(str: string, cb?: Function): boolean; | ||
write(str: string, encoding: string, cb?: Function): boolean; | ||
write(str: string, encoding?: string, fd?: string): boolean; | ||
end(): void; | ||
end(chunk: Buffer, cb?: Function): void; | ||
end(chunk: string, cb?: Function): void; | ||
end(chunk: string, encoding: string, cb?: Function): void; | ||
write(buffer: Buffer | string, cb?: (err?: Error) => void): boolean; | ||
write(str: string, encoding?: string, cb?: (err?: Error) => void): boolean; | ||
end(cb?: () => void): void; | ||
end(chunk: string | Buffer, cb?: () => void): void; | ||
end(str: string, encoding?: string, cb?: () => void): void; | ||
pause(): void; | ||
@@ -288,7 +286,7 @@ resume(): void; | ||
export interface Headers { | ||
interface Headers { | ||
[key: string]: any; | ||
} | ||
export interface AuthOptions { | ||
interface AuthOptions { | ||
user?: string; | ||
@@ -302,3 +300,3 @@ username?: string; | ||
export interface OAuthOptions { | ||
interface OAuthOptions { | ||
callback?: string; | ||
@@ -314,7 +312,7 @@ consumer_key?: string; | ||
export interface HawkOptions { | ||
interface HawkOptions { | ||
credentials: any; | ||
} | ||
export interface AWSOptions { | ||
interface AWSOptions { | ||
secret: string; | ||
@@ -324,5 +322,5 @@ bucket?: string; | ||
export type Cookie = tough.Cookie; | ||
type Cookie = tough.Cookie; | ||
export interface CookieJar { | ||
interface CookieJar { | ||
setCookie(cookieOrStr: Cookie | string, uri: string | Url, options?: tough.CookieJar.SetCookieOptions): void; | ||
@@ -329,0 +327,0 @@ getCookieString(uri: string | Url): string; |
{ | ||
"name": "@types/request", | ||
"version": "2.0.10", | ||
"version": "2.0.11", | ||
"description": "TypeScript definitions for request", | ||
@@ -54,4 +54,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "9c3af5b156dccb67b1ccddbd02708d9497663cd4c31f16a6ced91a7de89d3607", | ||
"typesPublisherContentHash": "82fd5969560153f9df1dacb15431396ec472df71c450ca57f4f2fd89c00505c0", | ||
"typeScriptVersion": "2.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Thu, 11 Jan 2018 22:07:40 GMT | ||
* Last updated: Sun, 14 Jan 2018 15:52:18 GMT | ||
* Dependencies: stream, http, https, fs, form-data, tough-cookie, url, node | ||
@@ -14,0 +14,0 @@ * Global values: none |
15661
272