@cloudflare/workers-types 5.20261109.1 → 5.20261112.1
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/experimental/index.d.ts +246 -245
- package/experimental/index.ts +246 -245
- package/index.d.ts +246 -245
- package/index.ts +246 -245
- package/package.json +1 -1
package/experimental/index.d.ts
CHANGED
|
@@ -3568,251 +3568,6 @@ interface TraceMetrics {
|
|
|
3568
3568
|
interface UnsafeTraceMetrics {
|
|
3569
3569
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
3570
3570
|
}
|
|
3571
|
-
/**
|
|
3572
|
-
* The **`URL`** interface is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL.
|
|
3573
|
-
*
|
|
3574
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
3575
|
-
*/
|
|
3576
|
-
declare class URL {
|
|
3577
|
-
constructor(url: string | URL, base?: string | URL);
|
|
3578
|
-
/**
|
|
3579
|
-
* The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
|
|
3580
|
-
*
|
|
3581
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
|
|
3582
|
-
*/
|
|
3583
|
-
get origin(): string;
|
|
3584
|
-
/**
|
|
3585
|
-
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3586
|
-
*
|
|
3587
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3588
|
-
*/
|
|
3589
|
-
get href(): string;
|
|
3590
|
-
/**
|
|
3591
|
-
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3592
|
-
*
|
|
3593
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3594
|
-
*/
|
|
3595
|
-
set href(value: string);
|
|
3596
|
-
/**
|
|
3597
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
3598
|
-
*
|
|
3599
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3600
|
-
*/
|
|
3601
|
-
get protocol(): string;
|
|
3602
|
-
/**
|
|
3603
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
3604
|
-
*
|
|
3605
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3606
|
-
*/
|
|
3607
|
-
set protocol(value: string);
|
|
3608
|
-
/**
|
|
3609
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
3610
|
-
*
|
|
3611
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3612
|
-
*/
|
|
3613
|
-
get username(): string;
|
|
3614
|
-
/**
|
|
3615
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
3616
|
-
*
|
|
3617
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3618
|
-
*/
|
|
3619
|
-
set username(value: string);
|
|
3620
|
-
/**
|
|
3621
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
3622
|
-
*
|
|
3623
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3624
|
-
*/
|
|
3625
|
-
get password(): string;
|
|
3626
|
-
/**
|
|
3627
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
3628
|
-
*
|
|
3629
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3630
|
-
*/
|
|
3631
|
-
set password(value: string);
|
|
3632
|
-
/**
|
|
3633
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
3634
|
-
*
|
|
3635
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3636
|
-
*/
|
|
3637
|
-
get host(): string;
|
|
3638
|
-
/**
|
|
3639
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
3640
|
-
*
|
|
3641
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3642
|
-
*/
|
|
3643
|
-
set host(value: string);
|
|
3644
|
-
/**
|
|
3645
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
3646
|
-
*
|
|
3647
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3648
|
-
*/
|
|
3649
|
-
get hostname(): string;
|
|
3650
|
-
/**
|
|
3651
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
3652
|
-
*
|
|
3653
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3654
|
-
*/
|
|
3655
|
-
set hostname(value: string);
|
|
3656
|
-
/**
|
|
3657
|
-
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
3658
|
-
*
|
|
3659
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3660
|
-
*/
|
|
3661
|
-
get port(): string;
|
|
3662
|
-
/**
|
|
3663
|
-
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
3664
|
-
*
|
|
3665
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3666
|
-
*/
|
|
3667
|
-
set port(value: string);
|
|
3668
|
-
/**
|
|
3669
|
-
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
3670
|
-
*
|
|
3671
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3672
|
-
*/
|
|
3673
|
-
get pathname(): string;
|
|
3674
|
-
/**
|
|
3675
|
-
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
3676
|
-
*
|
|
3677
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3678
|
-
*/
|
|
3679
|
-
set pathname(value: string);
|
|
3680
|
-
/**
|
|
3681
|
-
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
3682
|
-
*
|
|
3683
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3684
|
-
*/
|
|
3685
|
-
get search(): string;
|
|
3686
|
-
/**
|
|
3687
|
-
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
3688
|
-
*
|
|
3689
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3690
|
-
*/
|
|
3691
|
-
set search(value: string);
|
|
3692
|
-
/**
|
|
3693
|
-
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
3694
|
-
*
|
|
3695
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3696
|
-
*/
|
|
3697
|
-
get hash(): string;
|
|
3698
|
-
/**
|
|
3699
|
-
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
3700
|
-
*
|
|
3701
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3702
|
-
*/
|
|
3703
|
-
set hash(value: string);
|
|
3704
|
-
/**
|
|
3705
|
-
* The **`searchParams`** read-only property of the URL interface returns a URLSearchParams object allowing access to the GET decoded query arguments contained in the URL.
|
|
3706
|
-
*
|
|
3707
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
3708
|
-
*/
|
|
3709
|
-
get searchParams(): URLSearchParams;
|
|
3710
|
-
/**
|
|
3711
|
-
* The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as URL.toString().
|
|
3712
|
-
*
|
|
3713
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
3714
|
-
*/
|
|
3715
|
-
toJSON(): string;
|
|
3716
|
-
/*function toString() { [native code] }*/
|
|
3717
|
-
toString(): string;
|
|
3718
|
-
/**
|
|
3719
|
-
* The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid.
|
|
3720
|
-
*
|
|
3721
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static)
|
|
3722
|
-
*/
|
|
3723
|
-
static canParse(url: string, base?: string): boolean;
|
|
3724
|
-
/**
|
|
3725
|
-
* The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters.
|
|
3726
|
-
*
|
|
3727
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static)
|
|
3728
|
-
*/
|
|
3729
|
-
static parse(url: string, base?: string): URL | null;
|
|
3730
|
-
/**
|
|
3731
|
-
* The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
|
|
3732
|
-
*
|
|
3733
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
3734
|
-
*/
|
|
3735
|
-
static createObjectURL(object: File | Blob): string;
|
|
3736
|
-
/**
|
|
3737
|
-
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL().
|
|
3738
|
-
*
|
|
3739
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static)
|
|
3740
|
-
*/
|
|
3741
|
-
static revokeObjectURL(object_url: string): void;
|
|
3742
|
-
}
|
|
3743
|
-
/**
|
|
3744
|
-
* The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
|
|
3745
|
-
*
|
|
3746
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
|
|
3747
|
-
*/
|
|
3748
|
-
declare class URLSearchParams {
|
|
3749
|
-
constructor(
|
|
3750
|
-
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
3751
|
-
);
|
|
3752
|
-
/**
|
|
3753
|
-
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
3754
|
-
*
|
|
3755
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
|
|
3756
|
-
*/
|
|
3757
|
-
get size(): number;
|
|
3758
|
-
/**
|
|
3759
|
-
* The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
|
|
3760
|
-
*
|
|
3761
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
3762
|
-
*/
|
|
3763
|
-
append(name: string, value: string): void;
|
|
3764
|
-
/**
|
|
3765
|
-
* The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
|
|
3766
|
-
*
|
|
3767
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
3768
|
-
*/
|
|
3769
|
-
delete(name: string, value?: string): void;
|
|
3770
|
-
/**
|
|
3771
|
-
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
3772
|
-
*
|
|
3773
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
3774
|
-
*/
|
|
3775
|
-
get(name: string): string | null;
|
|
3776
|
-
/**
|
|
3777
|
-
* The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
|
|
3778
|
-
*
|
|
3779
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
3780
|
-
*/
|
|
3781
|
-
getAll(name: string): string[];
|
|
3782
|
-
/**
|
|
3783
|
-
* The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
|
|
3784
|
-
*
|
|
3785
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
3786
|
-
*/
|
|
3787
|
-
has(name: string, value?: string): boolean;
|
|
3788
|
-
/**
|
|
3789
|
-
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value. If there were several matching values, this method deletes the others. If the search parameter doesn't exist, this method creates it.
|
|
3790
|
-
*
|
|
3791
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
3792
|
-
*/
|
|
3793
|
-
set(name: string, value: string): void;
|
|
3794
|
-
/**
|
|
3795
|
-
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns undefined. Key/value pairs are sorted by the values of the UTF-16 code units of the keys. This method uses a stable sorting algorithm (i.e., the relative order between key/value pairs with equal keys will be preserved).
|
|
3796
|
-
*
|
|
3797
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
3798
|
-
*/
|
|
3799
|
-
sort(): void;
|
|
3800
|
-
entries(): IterableIterator<[key: string, value: string]>;
|
|
3801
|
-
keys(): IterableIterator<string>;
|
|
3802
|
-
values(): IterableIterator<string>;
|
|
3803
|
-
forEach<This = unknown>(
|
|
3804
|
-
callback: (
|
|
3805
|
-
this: This,
|
|
3806
|
-
value: string,
|
|
3807
|
-
key: string,
|
|
3808
|
-
parent: URLSearchParams,
|
|
3809
|
-
) => void,
|
|
3810
|
-
thisArg?: This,
|
|
3811
|
-
): void;
|
|
3812
|
-
/*function toString() { [native code] }*/
|
|
3813
|
-
toString(): string;
|
|
3814
|
-
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
3815
|
-
}
|
|
3816
3571
|
/**
|
|
3817
3572
|
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
3818
3573
|
*
|
|
@@ -18172,6 +17927,252 @@ declare namespace TailStream {
|
|
|
18172
17927
|
};
|
|
18173
17928
|
type TailEventHandlerType = TailEventHandler | TailEventHandlerObject;
|
|
18174
17929
|
}
|
|
17930
|
+
// URL and URLSearchParams, as WHATWG URL declares them, at every compatibility
|
|
17931
|
+
// date. Without the urlsearchparams_delete_has_value_arg compatibility flag
|
|
17932
|
+
// (the default from 2023-07-01), delete() and has() ignore `value`.
|
|
17933
|
+
/**
|
|
17934
|
+
* The **`URL`** interface is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL.
|
|
17935
|
+
*
|
|
17936
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
17937
|
+
*/
|
|
17938
|
+
declare class URL {
|
|
17939
|
+
constructor(url: string | URL, base?: string | URL);
|
|
17940
|
+
/**
|
|
17941
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
17942
|
+
*
|
|
17943
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
17944
|
+
*/
|
|
17945
|
+
get href(): string;
|
|
17946
|
+
/**
|
|
17947
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
17948
|
+
*
|
|
17949
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
17950
|
+
*/
|
|
17951
|
+
set href(value: string);
|
|
17952
|
+
/**
|
|
17953
|
+
* The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
|
|
17954
|
+
*
|
|
17955
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
|
|
17956
|
+
*/
|
|
17957
|
+
get origin(): string;
|
|
17958
|
+
/**
|
|
17959
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
17960
|
+
*
|
|
17961
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
17962
|
+
*/
|
|
17963
|
+
get protocol(): string;
|
|
17964
|
+
/**
|
|
17965
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
17966
|
+
*
|
|
17967
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
17968
|
+
*/
|
|
17969
|
+
set protocol(value: string);
|
|
17970
|
+
/**
|
|
17971
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
17972
|
+
*
|
|
17973
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
17974
|
+
*/
|
|
17975
|
+
get username(): string;
|
|
17976
|
+
/**
|
|
17977
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
17978
|
+
*
|
|
17979
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
17980
|
+
*/
|
|
17981
|
+
set username(value: string);
|
|
17982
|
+
/**
|
|
17983
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
17984
|
+
*
|
|
17985
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
17986
|
+
*/
|
|
17987
|
+
get password(): string;
|
|
17988
|
+
/**
|
|
17989
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
17990
|
+
*
|
|
17991
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
17992
|
+
*/
|
|
17993
|
+
set password(value: string);
|
|
17994
|
+
/**
|
|
17995
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
17996
|
+
*
|
|
17997
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
17998
|
+
*/
|
|
17999
|
+
get host(): string;
|
|
18000
|
+
/**
|
|
18001
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
18002
|
+
*
|
|
18003
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
18004
|
+
*/
|
|
18005
|
+
set host(value: string);
|
|
18006
|
+
/**
|
|
18007
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
18008
|
+
*
|
|
18009
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
18010
|
+
*/
|
|
18011
|
+
get hostname(): string;
|
|
18012
|
+
/**
|
|
18013
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
18014
|
+
*
|
|
18015
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
18016
|
+
*/
|
|
18017
|
+
set hostname(value: string);
|
|
18018
|
+
/**
|
|
18019
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
18020
|
+
*
|
|
18021
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
18022
|
+
*/
|
|
18023
|
+
get port(): string;
|
|
18024
|
+
/**
|
|
18025
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
18026
|
+
*
|
|
18027
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
18028
|
+
*/
|
|
18029
|
+
set port(value: string);
|
|
18030
|
+
/**
|
|
18031
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
18032
|
+
*
|
|
18033
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
18034
|
+
*/
|
|
18035
|
+
get pathname(): string;
|
|
18036
|
+
/**
|
|
18037
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
18038
|
+
*
|
|
18039
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
18040
|
+
*/
|
|
18041
|
+
set pathname(value: string);
|
|
18042
|
+
/**
|
|
18043
|
+
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
18044
|
+
*
|
|
18045
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
18046
|
+
*/
|
|
18047
|
+
get search(): string;
|
|
18048
|
+
/**
|
|
18049
|
+
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
18050
|
+
*
|
|
18051
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
18052
|
+
*/
|
|
18053
|
+
set search(value: string);
|
|
18054
|
+
/**
|
|
18055
|
+
* The **`searchParams`** read-only property of the URL interface returns a URLSearchParams object allowing access to the GET decoded query arguments contained in the URL.
|
|
18056
|
+
*
|
|
18057
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
18058
|
+
*/
|
|
18059
|
+
get searchParams(): URLSearchParams;
|
|
18060
|
+
/**
|
|
18061
|
+
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
18062
|
+
*
|
|
18063
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
18064
|
+
*/
|
|
18065
|
+
get hash(): string;
|
|
18066
|
+
/**
|
|
18067
|
+
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
18068
|
+
*
|
|
18069
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
18070
|
+
*/
|
|
18071
|
+
set hash(value: string);
|
|
18072
|
+
/**
|
|
18073
|
+
* The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as URL.toString().
|
|
18074
|
+
*
|
|
18075
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
18076
|
+
*/
|
|
18077
|
+
toJSON(): string;
|
|
18078
|
+
toString(): string;
|
|
18079
|
+
/**
|
|
18080
|
+
* The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid.
|
|
18081
|
+
*
|
|
18082
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static)
|
|
18083
|
+
*/
|
|
18084
|
+
static canParse(url: string | URL, base?: string | URL): boolean;
|
|
18085
|
+
/**
|
|
18086
|
+
* The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters.
|
|
18087
|
+
*
|
|
18088
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static)
|
|
18089
|
+
*/
|
|
18090
|
+
static parse(url: string | URL, base?: string | URL): URL | null;
|
|
18091
|
+
/**
|
|
18092
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
|
|
18093
|
+
*
|
|
18094
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
18095
|
+
*/
|
|
18096
|
+
static createObjectURL(object: File | Blob): string;
|
|
18097
|
+
/**
|
|
18098
|
+
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL().
|
|
18099
|
+
*
|
|
18100
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static)
|
|
18101
|
+
*/
|
|
18102
|
+
static revokeObjectURL(object_url: string): void;
|
|
18103
|
+
}
|
|
18104
|
+
/**
|
|
18105
|
+
* The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
|
|
18106
|
+
*
|
|
18107
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
|
|
18108
|
+
*/
|
|
18109
|
+
declare class URLSearchParams {
|
|
18110
|
+
constructor(
|
|
18111
|
+
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
18112
|
+
);
|
|
18113
|
+
/**
|
|
18114
|
+
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
18115
|
+
*
|
|
18116
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
|
|
18117
|
+
*/
|
|
18118
|
+
get size(): number;
|
|
18119
|
+
/**
|
|
18120
|
+
* The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
|
|
18121
|
+
*
|
|
18122
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
18123
|
+
*/
|
|
18124
|
+
append(name: string, value: string): void;
|
|
18125
|
+
/**
|
|
18126
|
+
* The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
|
|
18127
|
+
*
|
|
18128
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
18129
|
+
*/
|
|
18130
|
+
delete(name: string, value?: string): void;
|
|
18131
|
+
/**
|
|
18132
|
+
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
18133
|
+
*
|
|
18134
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
18135
|
+
*/
|
|
18136
|
+
get(name: string): string | null;
|
|
18137
|
+
/**
|
|
18138
|
+
* The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
|
|
18139
|
+
*
|
|
18140
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
18141
|
+
*/
|
|
18142
|
+
getAll(name: string): string[];
|
|
18143
|
+
/**
|
|
18144
|
+
* The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
|
|
18145
|
+
*
|
|
18146
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
18147
|
+
*/
|
|
18148
|
+
has(name: string, value?: string): boolean;
|
|
18149
|
+
/**
|
|
18150
|
+
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value. If there were several matching values, this method deletes the others. If the search parameter doesn't exist, this method creates it.
|
|
18151
|
+
*
|
|
18152
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
18153
|
+
*/
|
|
18154
|
+
set(name: string, value: string): void;
|
|
18155
|
+
/**
|
|
18156
|
+
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns undefined. Key/value pairs are sorted by the values of the UTF-16 code units of the keys. This method uses a stable sorting algorithm (i.e., the relative order between key/value pairs with equal keys will be preserved).
|
|
18157
|
+
*
|
|
18158
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
18159
|
+
*/
|
|
18160
|
+
sort(): void;
|
|
18161
|
+
entries(): IterableIterator<[key: string, value: string]>;
|
|
18162
|
+
keys(): IterableIterator<string>;
|
|
18163
|
+
values(): IterableIterator<string>;
|
|
18164
|
+
forEach<This = unknown>(
|
|
18165
|
+
callback: (
|
|
18166
|
+
this: This,
|
|
18167
|
+
value: string,
|
|
18168
|
+
key: string,
|
|
18169
|
+
parent: URLSearchParams,
|
|
18170
|
+
) => void,
|
|
18171
|
+
thisArg?: This,
|
|
18172
|
+
): void;
|
|
18173
|
+
toString(): string;
|
|
18174
|
+
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
18175
|
+
}
|
|
18175
18176
|
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
18176
18177
|
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
18177
18178
|
// https://opensource.org/licenses/Apache-2.0
|