bare-url 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/global.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import * as url from '.'
2
+
3
+ declare global {
4
+ interface URL extends url.URL {}
5
+
6
+ class URL extends url.URL {}
7
+ }
package/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- declare class URL {
2
- constructor(input: string, base?: string | URL)
3
-
1
+ interface URL {
4
2
  href: string
5
3
  protocol: string
6
4
  username: string
@@ -16,6 +14,10 @@ declare class URL {
16
14
  toJSON(): string
17
15
  }
18
16
 
17
+ declare class URL {
18
+ constructor(input: string, base?: string | URL)
19
+ }
20
+
19
21
  declare namespace URL {
20
22
  export function isURL(value: unknown): value is URL
21
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-url",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "WHATWG URL implementation for JavaScript",
5
5
  "exports": {
6
6
  ".": {
@@ -8,12 +8,16 @@
8
8
  "default": "./index.js"
9
9
  },
10
10
  "./package": "./package.json",
11
- "./global": "./global.js"
11
+ "./global": {
12
+ "types": "./global.d.ts",
13
+ "default": "./global.js"
14
+ }
12
15
  },
13
16
  "files": [
14
17
  "index.js",
15
18
  "index.d.ts",
16
19
  "global.js",
20
+ "global.d.ts",
17
21
  "binding.c",
18
22
  "binding.js",
19
23
  "CMakeLists.txt",