From 40b7b99c2c2bd85a205822d2be352983ba7fba2e Mon Sep 17 00:00:00 2001 From: SaltyAom Date: Sat, 16 Jul 2022 02:00:16 +0700 Subject: [PATCH] fix(types): add missing types from URLSearchParams (#731) * feat(examples): add kingworld * fix(examples/kingworld): add .gitignore * fix(template/kingworld): rename .gitignore to gitignore * fix(template/kingworld): update to request change * fix(template/kingworld): update 'getting start' to 'Getting Started' * template(kingworld/bun): update to requested change * fix(bun-types): add missing method type of URLSearchParams --- types/bun/globals.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/types/bun/globals.d.ts b/types/bun/globals.d.ts index aad02d70ff..5ed32b939f 100644 --- a/types/bun/globals.d.ts +++ b/types/bun/globals.d.ts @@ -1291,12 +1291,17 @@ interface URLSearchParams { /** Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. */ set(name: string, value: string): void; sort(): void; - /** Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */ - toString(): string; + entries(): IterableIterator<[string, string]>; + /** Returns an iterator allowing to go through all keys of the key/value pairs of this search parameter. */ + keys(): IterableIterator; + /** Returns an iterator allowing to go through all values of the key/value pairs of this search parameter. */ + values(): IterableIterator; forEach( callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any ): void; + /** Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */ + toString(): string; } declare var URLSearchParams: {