mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
Merge pull request #32801 from offirgolan/patch-1
fix(url-parse): Add optional stringify fn to `toString`
This commit is contained in:
Vendored
+4
-2
@@ -23,6 +23,8 @@ declare namespace URLParse {
|
||||
| 'username';
|
||||
|
||||
type QueryParser = (query: string) => object;
|
||||
|
||||
type StringifyQuery = (query: object) => string;
|
||||
}
|
||||
|
||||
interface URLParse {
|
||||
@@ -40,7 +42,7 @@ interface URLParse {
|
||||
readonly slashes: boolean;
|
||||
readonly username: string;
|
||||
set(part: URLParse.URLPart, value: string | object | number | undefined, fn?: boolean | URLParse.QueryParser): URLParse;
|
||||
toString(): string;
|
||||
toString(stringify?: URLParse.StringifyQuery): string;
|
||||
}
|
||||
|
||||
declare const URLParse: {
|
||||
@@ -57,7 +59,7 @@ declare const URLParse: {
|
||||
location(url: string): object;
|
||||
qs: {
|
||||
parse: URLParse.QueryParser;
|
||||
stringify(query: object): string;
|
||||
stringify: URLParse.StringifyQuery;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user