Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
eggers committed Oct 28, 2015
1 parent 62eedc3 commit 1d7d9e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion request-promise/request-promise.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ declare module 'request-promise' {
function RequestPromiseAPI(uri: string): Promise<request.Request>;

module RequestPromiseAPI {
export interface Options extends request.Options {
interface AdditionalOptions {
simple?: boolean;
transform?: (body: any, response: http.IncomingMessage) => any;
resolveWithFullResponse?: boolean;
}
export type Options = AdditionalOptions & request.Options;
}
}
14 changes: 11 additions & 3 deletions request/request.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,15 @@ declare module 'request' {

export var initParams: any;

export interface Options {
url?: string;
uri?: string;
interface UriOptions {
uri: string;
}

interface UrlOptions {
url: string;
}

interface OptionalOptions {
callback?: (error: any, response: http.IncomingMessage, body: any) => void;
jar?: any; // CookieJar
formData?: any; // Object
Expand Down Expand Up @@ -90,6 +96,8 @@ declare module 'request' {
gzip?: boolean;
}

export type Options = (UriOptions|UrlOptions)&OptionalOptions;

export interface RequestPart {
headers?: Headers;
body: any;
Expand Down

0 comments on commit 1d7d9e5

Please sign in to comment.