Fix url.format() param type.

This commit is contained in:
Nick Howes
2013-12-03 13:20:56 +00:00
parent 9d24e5d8f6
commit 04ddf4ba31
2 changed files with 25 additions and 1 deletions

13
node/node.d.ts vendored
View File

@@ -599,8 +599,19 @@ declare module "url" {
slashes: boolean;
}
export interface UrlOptions {
protocol?: string;
auth?: string;
hostname?: string;
port?: string;
host?: string;
pathname?: string;
search?: string;
query?: any;
}
export function parse(urlStr: string, parseQueryString?: boolean , slashesDenoteHost?: boolean ): Url;
export function format(url: Url): string;
export function format(url: UrlOptions): string;
export function resolve(from: string, to: string): string;
}