mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
chore: fix Deno.UnsafeWindowSurface
typings (#22081)
- changed `Deno.UnsafeWindowSurface` typings from accepting `Deno.UnsafePointerView` to `Deno.PointerValue` - added width and height to `GPUCanvasConfiguration`
This commit is contained in:
parent
a5a973e93c
commit
6b5c9764ac
3 changed files with 4 additions and 3 deletions
|
@ -238,7 +238,6 @@ Deno.test({
|
||||||
|
|
||||||
assertThrows(
|
assertThrows(
|
||||||
() => {
|
() => {
|
||||||
// @ts-expect-error: runtime test for null handle
|
|
||||||
new Deno.UnsafeWindowSurface("cocoa", null, null);
|
new Deno.UnsafeWindowSurface("cocoa", null, null);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
4
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
4
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -783,8 +783,8 @@ declare namespace Deno {
|
||||||
export class UnsafeWindowSurface {
|
export class UnsafeWindowSurface {
|
||||||
constructor(
|
constructor(
|
||||||
system: "cocoa" | "win32" | "x11",
|
system: "cocoa" | "win32" | "x11",
|
||||||
windowHandle: UnsafePointerView,
|
windowHandle: Deno.PointerValue<unknown>,
|
||||||
displayHandle: UnsafePointerView | null,
|
displayHandle: Deno.PointerValue<unknown>,
|
||||||
);
|
);
|
||||||
getContext(context: "webgpu"): GPUCanvasContext;
|
getContext(context: "webgpu"): GPUCanvasContext;
|
||||||
present(): void;
|
present(): void;
|
||||||
|
|
2
cli/tsc/dts/lib.deno_webgpu.d.ts
vendored
2
cli/tsc/dts/lib.deno_webgpu.d.ts
vendored
|
@ -1325,6 +1325,8 @@ declare interface GPUCanvasConfiguration {
|
||||||
viewFormats?: GPUTextureFormat[];
|
viewFormats?: GPUTextureFormat[];
|
||||||
colorSpace?: "srgb" | "display-p3";
|
colorSpace?: "srgb" | "display-p3";
|
||||||
alphaMode?: GPUCanvasAlphaMode;
|
alphaMode?: GPUCanvasAlphaMode;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
}
|
}
|
||||||
/** @category WebGPU */
|
/** @category WebGPU */
|
||||||
declare interface GPUCanvasContext {
|
declare interface GPUCanvasContext {
|
||||||
|
|
Loading…
Add table
Reference in a new issue