summaryrefslogtreecommitdiff
path: root/ext/url
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2024-08-05 07:21:57 -0700
committerGitHub <noreply@github.com>2024-08-05 07:21:57 -0700
commite97764e7ecfea960987b63a550fb45bc3d2171da (patch)
tree0a450ecb566c9032905c30eace6d4e5cea44189b /ext/url
parent27ea23ea69bc018f48abbd4ec0d0572b6d1beca4 (diff)
fix(urlpattern): correct typings for added APIs (#24881)
Diffstat (limited to 'ext/url')
-rw-r--r--ext/url/lib.deno_url.d.ts24
1 files changed, 23 insertions, 1 deletions
diff --git a/ext/url/lib.deno_url.d.ts b/ext/url/lib.deno_url.d.ts
index ca5b00e60..71a781636 100644
--- a/ext/url/lib.deno_url.d.ts
+++ b/ext/url/lib.deno_url.d.ts
@@ -250,6 +250,20 @@ declare interface URLPatternResult {
}
/**
+ * 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
* on a convenient pattern syntax.
*
@@ -343,6 +357,9 @@ declare interface URLPattern {
readonly search: string;
/** The pattern string for the `hash`. */
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: {
readonly prototype: URLPattern;
- new (input: URLPatternInput, baseURL?: string): URLPattern;
+ new (
+ input: URLPatternInput,
+ baseURL: string,
+ options?: URLPatternOptions,
+ ): URLPattern;
+ new (input?: URLPatternInput, options?: URLPatternOptions): URLPattern;
};