mirror of
https://github.com/denoland/deno.git
synced 2025-02-08 07:16:56 -05:00
fix(urlpattern): correct typings for added APIs (#24881)
This commit is contained in:
parent
27ea23ea69
commit
e97764e7ec
1 changed files with 23 additions and 1 deletions
24
ext/url/lib.deno_url.d.ts
vendored
24
ext/url/lib.deno_url.d.ts
vendored
|
@ -249,6 +249,20 @@ declare interface URLPatternResult {
|
||||||
hash: URLPatternComponentResult;
|
hash: URLPatternComponentResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Options for the {@linkcode URLPattern} constructor.
|
||||||
|
*
|
||||||
|
* @category URL
|
||||||
|
*/
|
||||||
|
declare interface URLPatternOptions {
|
||||||
|
/**
|
||||||
|
* Enables case-insensitive matching.
|
||||||
|
*
|
||||||
|
* @default {false}
|
||||||
|
*/
|
||||||
|
ignoreCase: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URLPattern API provides a web platform primitive for matching URLs based
|
* The URLPattern API provides a web platform primitive for matching URLs based
|
||||||
* on a convenient pattern syntax.
|
* on a convenient pattern syntax.
|
||||||
|
@ -343,6 +357,9 @@ declare interface URLPattern {
|
||||||
readonly search: string;
|
readonly search: string;
|
||||||
/** The pattern string for the `hash`. */
|
/** The pattern string for the `hash`. */
|
||||||
readonly hash: string;
|
readonly hash: string;
|
||||||
|
|
||||||
|
/** Whether or not any of the specified groups use regexp groups. */
|
||||||
|
readonly hasRegExpGroups: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -377,5 +394,10 @@ declare interface URLPattern {
|
||||||
*/
|
*/
|
||||||
declare var URLPattern: {
|
declare var URLPattern: {
|
||||||
readonly prototype: URLPattern;
|
readonly prototype: URLPattern;
|
||||||
new (input: URLPatternInput, baseURL?: string): URLPattern;
|
new (
|
||||||
|
input: URLPatternInput,
|
||||||
|
baseURL: string,
|
||||||
|
options?: URLPatternOptions,
|
||||||
|
): URLPattern;
|
||||||
|
new (input?: URLPatternInput, options?: URLPatternOptions): URLPattern;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue