summaryrefslogtreecommitdiff
path: root/ext/url/lib.deno_url.d.ts
diff options
context:
space:
mode:
authorLibing Chen <libing.chen@gmail.com>2021-10-15 02:25:48 -0700
committerGitHub <noreply@github.com>2021-10-15 11:25:48 +0200
commit004d07dccd69c9fae8370665632d90401f770938 (patch)
tree79dfed032812e878094dc09d5b983fff31974a1c /ext/url/lib.deno_url.d.ts
parent74364889f0b14b2ae130d7a2ef86a4f6c5eb1170 (diff)
fix(docs): correct `pattern.match()` to `pattern.exec()` (#12450)
Diffstat (limited to 'ext/url/lib.deno_url.d.ts')
-rw-r--r--ext/url/lib.deno_url.d.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/url/lib.deno_url.d.ts b/ext/url/lib.deno_url.d.ts
index b2ef4095f..bb13bdbcc 100644
--- a/ext/url/lib.deno_url.d.ts
+++ b/ext/url/lib.deno_url.d.ts
@@ -225,7 +225,7 @@ declare interface URLPatternResult {
* ```ts
* // Specify the pattern as structured data.
* const pattern = new URLPattern({ pathname: "/users/:user" });
- * const match = pattern.match("/users/joe");
+ * const match = pattern.exec("/users/joe");
* console.log(match.pathname.groups.user); // joe
* ```
*
@@ -277,15 +277,15 @@ declare class URLPattern {
* const pattern = new URLPattern("https://example.com/books/:id");
*
* // Match a url string.
- * let match = pattern.match("https://example.com/books/123");
+ * let match = pattern.exec("https://example.com/books/123");
* console.log(match.pathname.groups.id); // 123
*
* // Match a relative url with a base.
- * match = pattern.match("/books/123", "https://example.com");
+ * match = pattern.exec("/books/123", "https://example.com");
* console.log(match.pathname.groups.id); // 123
*
* // Match an object of url components.
- * match = pattern.match({ pathname: "/books/123" });
+ * match = pattern.exec({ pathname: "/books/123" });
* console.log(match.pathname.groups.id); // 123
* ```
*/