From f6f4ccbe9da7794721849f28de4092b02128f067 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 8 Feb 2026 23:37:56 +0100 Subject: [PATCH] Add GPUDevice except methods Because each method brings it's own dictionary and that becomes massive... --- baselines/dom.generated.d.ts | 55 ++++++++++++++++++++ baselines/serviceworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/sharedworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.5/dom.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.5/serviceworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.5/sharedworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.5/webworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.6/dom.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.6/serviceworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.6/sharedworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.6/webworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.9/dom.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.9/serviceworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.9/sharedworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/ts5.9/webworker.generated.d.ts | 55 ++++++++++++++++++++ baselines/webworker.generated.d.ts | 55 ++++++++++++++++++++ inputfiles/overridingTypes.jsonc | 4 +- 17 files changed, 883 insertions(+), 1 deletion(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index f58f18408..3a5e34d08 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -808,6 +808,7 @@ interface FullscreenOptions { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -15274,6 +15275,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 880b162e1..f29228200 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -275,6 +275,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -4717,6 +4718,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index a4a1503d6..8a2b414ac 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -219,6 +219,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -4400,6 +4401,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 67c99fd69..cad1bafdf 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -805,6 +805,7 @@ interface FullscreenOptions { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -15260,6 +15261,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index d4ff29b39..014d4f6a0 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -272,6 +272,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -4714,6 +4715,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index ae862a7b6..a66257021 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -216,6 +216,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -4397,6 +4398,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index 3f7932fd1..5f6cd214e 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -362,6 +362,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -5416,6 +5417,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.6/dom.generated.d.ts b/baselines/ts5.6/dom.generated.d.ts index 2004b28fc..dcf3e3397 100644 --- a/baselines/ts5.6/dom.generated.d.ts +++ b/baselines/ts5.6/dom.generated.d.ts @@ -805,6 +805,7 @@ interface FullscreenOptions { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -15271,6 +15272,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.6/serviceworker.generated.d.ts b/baselines/ts5.6/serviceworker.generated.d.ts index d4ff29b39..014d4f6a0 100644 --- a/baselines/ts5.6/serviceworker.generated.d.ts +++ b/baselines/ts5.6/serviceworker.generated.d.ts @@ -272,6 +272,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -4714,6 +4715,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.6/sharedworker.generated.d.ts b/baselines/ts5.6/sharedworker.generated.d.ts index ae862a7b6..a66257021 100644 --- a/baselines/ts5.6/sharedworker.generated.d.ts +++ b/baselines/ts5.6/sharedworker.generated.d.ts @@ -216,6 +216,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -4397,6 +4398,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.6/webworker.generated.d.ts b/baselines/ts5.6/webworker.generated.d.ts index 3f7932fd1..5f6cd214e 100644 --- a/baselines/ts5.6/webworker.generated.d.ts +++ b/baselines/ts5.6/webworker.generated.d.ts @@ -362,6 +362,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -5416,6 +5417,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.9/dom.generated.d.ts b/baselines/ts5.9/dom.generated.d.ts index 61116c9ce..62a263f45 100644 --- a/baselines/ts5.9/dom.generated.d.ts +++ b/baselines/ts5.9/dom.generated.d.ts @@ -805,6 +805,7 @@ interface FullscreenOptions { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -15271,6 +15272,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.9/serviceworker.generated.d.ts b/baselines/ts5.9/serviceworker.generated.d.ts index d10dedce3..31269f101 100644 --- a/baselines/ts5.9/serviceworker.generated.d.ts +++ b/baselines/ts5.9/serviceworker.generated.d.ts @@ -272,6 +272,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -4714,6 +4715,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.9/sharedworker.generated.d.ts b/baselines/ts5.9/sharedworker.generated.d.ts index 29cf7850f..a38f3fb20 100644 --- a/baselines/ts5.9/sharedworker.generated.d.ts +++ b/baselines/ts5.9/sharedworker.generated.d.ts @@ -216,6 +216,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -4397,6 +4398,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/ts5.9/webworker.generated.d.ts b/baselines/ts5.9/webworker.generated.d.ts index f459832a5..6a97908df 100644 --- a/baselines/ts5.9/webworker.generated.d.ts +++ b/baselines/ts5.9/webworker.generated.d.ts @@ -362,6 +362,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -5416,6 +5417,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index 6d059a93a..5548bcc64 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -365,6 +365,7 @@ interface FontFaceSetLoadEventInit extends EventInit { interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; colorSpace?: PredefinedColorSpace; + device: GPUDevice; format: GPUTextureFormat; toneMapping?: GPUCanvasToneMapping; usage?: GPUTextureUsageFlags; @@ -5419,6 +5420,60 @@ interface GPUDebugCommandsMixin { pushDebugGroup(groupLabel: string): void; } +interface GPUDeviceEventMap { + "uncapturederror": GPUUncapturedErrorEvent; +} + +/** + * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed. + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** + * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo) + */ + readonly adapterInfo: GPUAdapterInfo; + /** + * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) + */ + readonly features: GPUSupportedFeatures; + /** + * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) + */ + readonly limits: GPUSupportedLimits; + /** + * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) + */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */ + onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null; + /** + * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) + */ + readonly queue: GPUQueue; + addEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + /** * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. * Available only in secure contexts. diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 66766e551..10f5f2bc5 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -2878,7 +2878,9 @@ "exposed": "" }, "GPUDevice": { - "exposed": "" + "methods": { + "exposed": "" + } }, "TrustedHTML": { "exposed": ""