From c1a52d44d7233fe98e88f45ed755954cbf0fb228 Mon Sep 17 00:00:00 2001 From: Ian Spivey Date: Thu, 14 May 2020 15:54:23 -0500 Subject: [PATCH] Adds URLSearchParams iterable methods --- index.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/index.d.ts b/index.d.ts index c0695777..0aa4b2c0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -220,6 +220,22 @@ interface Headers { values(): IterableIterator; } +interface URLSearchParams { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an array of key, value pairs for every entry in the search params. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns a list of keys in the search params. + */ + keys(): IterableIterator; + /** + * Returns a list of values in the search params. + */ + values(): IterableIterator; +} + interface ContentOptions { /** * Controls the way the HTMLRewriter treats inserted content.