Skip to content

Commit

Permalink
fix(types): allow URL as uri argument type
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Mar 15, 2019
1 parent ccc94ed commit 55636eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions httpie.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Url} from "url";
import {Url, URL} from "url";
import {IncomingMessage} from "http";

export interface HttpieOptions {
Expand All @@ -14,9 +14,9 @@ export interface HttpieResponse<T = any> extends IncomingMessage {
data: T,
}

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

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

export {
method as get,
Expand Down

0 comments on commit 55636eb

Please sign in to comment.