Skip to content

Commit

Permalink
Use generic Options to allow for custom options from request-promise
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Skeen committed Oct 7, 2015
1 parent 6c9b4cf commit 2d23048
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions request/request.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,34 @@ declare module 'request' {

namespace request {
export interface RequestAPI<TRequest extends Request, TOptions extends Options> {
defaults(options: Options): RequestAPI<TRequest, TOptions>;
(uri: string, options?: Options, callback?: RequestCallback): TRequest;
defaults(options: TOptions): RequestAPI<TRequest, TOptions>;
(uri: string, options?: TOptions, callback?: RequestCallback): TRequest;
(uri: string, callback?: RequestCallback): TRequest;
(options?: Options, callback?: RequestCallback): TRequest;
(options?: TOptions, callback?: RequestCallback): TRequest;

get(uri: string, options?: Options, callback?: RequestCallback): TRequest;
get(uri: string, options?: TOptions, callback?: RequestCallback): TRequest;
get(uri: string, callback?: RequestCallback): TRequest;
get(options: Options, callback?: RequestCallback): TRequest;
get(options: TOptions, callback?: RequestCallback): TRequest;

post(uri: string, options?: Options, callback?: RequestCallback): TRequest;
post(uri: string, options?: TOptions, callback?: RequestCallback): TRequest;
post(uri: string, callback?: RequestCallback): TRequest;
post(options: Options, callback?: RequestCallback): TRequest;
post(options: TOptions, callback?: RequestCallback): TRequest;

put(uri: string, options?: Options, callback?: RequestCallback): TRequest;
put(uri: string, options?: TOptions, callback?: RequestCallback): TRequest;
put(uri: string, callback?: RequestCallback): TRequest;
put(options: Options, callback?: RequestCallback): TRequest;
put(options: TOptions, callback?: RequestCallback): TRequest;

head(uri: string, options?: Options, callback?: RequestCallback): TRequest;
head(uri: string, options?: TOptions, callback?: RequestCallback): TRequest;
head(uri: string, callback?: RequestCallback): TRequest;
head(options: Options, callback?: RequestCallback): TRequest;
head(options: TOptions, callback?: RequestCallback): TRequest;

patch(uri: string, options?: Options, callback?: RequestCallback): TRequest;
patch(uri: string, options?: TOptions, callback?: RequestCallback): TRequest;
patch(uri: string, callback?: RequestCallback): TRequest;
patch(options: Options, callback?: RequestCallback): TRequest;
patch(options: TOptions, callback?: RequestCallback): TRequest;

del(uri: string, options?: Options, callback?: RequestCallback): TRequest;
del(uri: string, options?: TOptions, callback?: RequestCallback): TRequest;
del(uri: string, callback?: RequestCallback): TRequest;
del(options: Options, callback?: RequestCallback): TRequest;
del(options: TOptions, callback?: RequestCallback): TRequest;

forever(agentOptions: any, optionsArg: any): TRequest;
jar(): CookieJar;
Expand Down

0 comments on commit 2d23048

Please sign in to comment.