Skip to content

Commit 5d7f8a9

Browse files
slowcheetahzloirock
authored andcommitted
Enable URLSearchParams tests & some web types & tests improvements
1 parent a2f6665 commit 5d7f8a9

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
lines changed
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
interface URL { // @type-options no-extends
2-
/**
3-
* Returns a JSON representation of the URL.
4-
*/
5-
toJSON(): string;
6-
}
1+
// empty
2+
// Moved to ../core-js-modules/url.d.ts
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import 'core-js/full';
2+
3+
const u0 = new URLSearchParams();
4+
const u1 = new URLSearchParams('a=1&b=2');
5+
const u2 = new URLSearchParams([['a', '1'], ['b', '2']]);
6+
const u3 = new URLSearchParams({ a: '1', b: '2' });
7+
8+
// @ts-expect-error
9+
new URLSearchParams(123);
10+
// @ts-expect-error
11+
new URLSearchParams([1, 2, 3]);

tests/type-definitions/global/web/url-search-params.test.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/type-definitions/global/web/url-to-json.test.ts renamed to tests/type-definitions/global/web/url-to-json.dom.test.ts

File renamed without changes.

0 commit comments

Comments
 (0)