diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 44e0bc024..f61f92c0e 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -2292,6 +2292,39 @@ interface ULongRange { min?: number; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -32994,6 +33027,81 @@ declare var URL: { type webkitURL = URL; declare var webkitURL: typeof URL; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -39472,6 +39580,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type VibratePattern = number | number[]; type WindowProxy = Window; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 177c63bee..0131bc5ee 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -708,6 +708,39 @@ interface Transformer { writableType?: undefined; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -7663,6 +7696,81 @@ declare var URL: { parse(url: string | URL, base?: string | URL): URL | null; }; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -11378,6 +11486,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type BinaryType = "arraybuffer" | "blob"; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 3950687c9..2a8a338d9 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -638,6 +638,39 @@ interface Transformer { writableType?: undefined; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -7206,6 +7239,81 @@ declare var URL: { revokeObjectURL(url: string): void; }; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -11066,6 +11174,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type BinaryType = "arraybuffer" | "blob"; diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 243f49514..04bc20e20 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -2292,6 +2292,39 @@ interface ULongRange { min?: number; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -32971,6 +33004,81 @@ declare var URL: { type webkitURL = URL; declare var webkitURL: typeof URL; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -39449,6 +39557,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type VibratePattern = number | number[]; type WindowProxy = Window; diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index ef7957e7f..1a9b2d88c 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -708,6 +708,39 @@ interface Transformer { writableType?: undefined; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -7663,6 +7696,81 @@ declare var URL: { parse(url: string | URL, base?: string | URL): URL | null; }; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -11378,6 +11486,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type BinaryType = "arraybuffer" | "blob"; diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index f74aa3347..5d667a78d 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -638,6 +638,39 @@ interface Transformer { writableType?: undefined; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -7206,6 +7239,81 @@ declare var URL: { revokeObjectURL(url: string): void; }; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -11066,6 +11174,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type BinaryType = "arraybuffer" | "blob"; diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index 19ddf7021..dece3699a 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -852,6 +852,39 @@ interface Transformer { writableType?: undefined; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -8812,6 +8845,81 @@ declare var URL: { revokeObjectURL(url: string): void; }; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -13036,6 +13144,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type AlphaOption = "discard" | "keep"; diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index dd1abcfff..9210977da 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -2292,6 +2292,39 @@ interface ULongRange { min?: number; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -32994,6 +33027,81 @@ declare var URL: { type webkitURL = URL; declare var webkitURL: typeof URL; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -39472,6 +39580,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type VibratePattern = number | number[]; type WindowProxy = Window; diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index ef7957e7f..1a9b2d88c 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -708,6 +708,39 @@ interface Transformer { writableType?: undefined; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -7663,6 +7696,81 @@ declare var URL: { parse(url: string | URL, base?: string | URL): URL | null; }; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -11378,6 +11486,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type BinaryType = "arraybuffer" | "blob"; diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index f74aa3347..5d667a78d 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -638,6 +638,39 @@ interface Transformer { writableType?: undefined; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -7206,6 +7239,81 @@ declare var URL: { revokeObjectURL(url: string): void; }; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -11066,6 +11174,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type BinaryType = "arraybuffer" | "blob"; diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index 19ddf7021..dece3699a 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -852,6 +852,39 @@ interface Transformer { writableType?: undefined; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -8812,6 +8845,81 @@ declare var URL: { revokeObjectURL(url: string): void; }; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -13036,6 +13144,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type AlphaOption = "discard" | "keep"; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 7302f0074..1f7f345e8 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -852,6 +852,39 @@ interface Transformer { writableType?: undefined; } +interface URLPatternComponentResult { + groups?: Record; + input?: string; +} + +interface URLPatternInit { + baseURL?: string; + hash?: string; + hostname?: string; + password?: string; + pathname?: string; + port?: string; + protocol?: string; + search?: string; + username?: string; +} + +interface URLPatternOptions { + ignoreCase?: boolean; +} + +interface URLPatternResult { + hash?: URLPatternComponentResult; + hostname?: URLPatternComponentResult; + inputs?: URLPatternInput[]; + password?: URLPatternComponentResult; + pathname?: URLPatternComponentResult; + port?: URLPatternComponentResult; + protocol?: URLPatternComponentResult; + search?: URLPatternComponentResult; + username?: URLPatternComponentResult; +} + interface UnderlyingByteSource { autoAllocateChunkSize?: number; cancel?: UnderlyingSourceCancelCallback; @@ -8812,6 +8845,81 @@ declare var URL: { revokeObjectURL(url: string): void; }; +/** + * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern) + */ +interface URLPattern { + readonly hasRegExpGroups: boolean; + /** + * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash) + */ + readonly hash: string; + /** + * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname) + */ + readonly hostname: string; + /** + * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password) + */ + readonly password: string; + /** + * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname) + */ + readonly pathname: string; + /** + * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port) + */ + readonly port: string; + /** + * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol) + */ + readonly protocol: string; + /** + * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search) + */ + readonly search: string; + /** + * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username) + */ + readonly username: string; + /** + * The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or `null` if the URL does not match the pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec) + */ + exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null; + /** + * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test) + */ + test(input?: URLPatternInput, baseURL?: string | URL): boolean; +} + +declare var URLPattern: { + prototype: URLPattern; + new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern; + new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern; +}; + /** * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. * @@ -13036,6 +13144,7 @@ type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame; type TimerHandler = string | Function; type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer; +type URLPatternInput = string | URLPatternInit; type Uint32List = Uint32Array | GLuint[]; type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type AlphaOption = "discard" | "keep"; diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index e92e511ff..1b9559938 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -3828,9 +3828,6 @@ "TrustedTypePolicyFactory": { "exposed": "" }, - "URLPattern": { - "exposed": "" - }, "ViewTimeline": { "exposed": "" },