Skip to content

Commit

Permalink
fix: typings (#8)
Browse files Browse the repository at this point in the history
* change the type of opts into Partial<HttpieOptions>

* let the default types for send<T> and method<T> be any
  • Loading branch information
t532 authored and lukeed committed Feb 2, 2019
1 parent b9c5505 commit 9438f0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions httpie.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export interface HttpieResponse<T = any> extends IncomingMessage {
data: T,
}

export declare function send<T>(method: string, uri: string | Url, opts?: HttpieOptions): Promise<HttpieResponse<T>>;
export declare function send<T = any>(method: string, uri: string | Url, opts?: Partial<HttpieOptions>): Promise<HttpieResponse<T>>;

declare function method<T>(uri: string | Url, opts?: HttpieOptions): Promise<HttpieResponse<T>>;
declare function method<T = any>(uri: string | Url, opts?: Partial<HttpieOptions>): Promise<HttpieResponse<T>>;

export {
method as get,
Expand Down

0 comments on commit 9438f0e

Please sign in to comment.