mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
reorder signatures; implement constructor signature
This commit is contained in:
parent
8d21ac9216
commit
23df99dcee
3
types/url-parse/index.d.ts
vendored
3
types/url-parse/index.d.ts
vendored
@ -44,9 +44,10 @@ interface URLParse {
|
||||
}
|
||||
|
||||
declare const URLParse: {
|
||||
new(address: string, parser?: boolean | URLParse.QueryParser): URLParse;
|
||||
new(address: string, location?: string | object, parser?: boolean | URLParse.QueryParser): URLParse;
|
||||
(address: string, location?: string | object, parser?: boolean | URLParse.QueryParser): URLParse;
|
||||
(address: string, parser?: boolean | URLParse.QueryParser): URLParse;
|
||||
(address: string, location?: string | object, parser?: boolean | URLParse.QueryParser): URLParse;
|
||||
|
||||
extractProtocol(url: string): {
|
||||
slashes: boolean;
|
||||
|
||||
@ -3,6 +3,7 @@ const parse = URL;
|
||||
|
||||
new URL('foo/bar', 'https://github.com/');
|
||||
new URL('foo/bar', 'https://github.com/', (query: string) => ({ query }));
|
||||
new URL('foo/bar', 'https://github.com/', true);
|
||||
parse('foo/bar', 'https://github.com/');
|
||||
parse('foo/bar', 'https://github.com/', (query: string) => ({ query }));
|
||||
const result = parse('foo/bar?baz=quux', true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user