summaryrefslogtreecommitdiff
path: root/ext/web/lib.deno_web.d.ts
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2024-02-07 01:11:15 +0100
committerGitHub <noreply@github.com>2024-02-07 01:11:15 +0100
commit1007358768584856ac63dffaa82fdb00bf726bd9 (patch)
tree57ee78c3ea4dad03f12982483ded3efc5d8061af /ext/web/lib.deno_web.d.ts
parent89ae2d88b8fe3e5cff0bd6023c05643fc4297686 (diff)
refactor: move ImageData to web extension (#22295)
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
Diffstat (limited to 'ext/web/lib.deno_web.d.ts')
-rw-r--r--ext/web/lib.deno_web.d.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/web/lib.deno_web.d.ts b/ext/web/lib.deno_web.d.ts
index 55048e14e..d28e33f58 100644
--- a/ext/web/lib.deno_web.d.ts
+++ b/ext/web/lib.deno_web.d.ts
@@ -1237,3 +1237,31 @@ declare var DecompressionStream: {
declare function reportError(
error: any,
): void;
+
+/** @category Web APIs */
+declare type PredefinedColorSpace = "srgb" | "display-p3";
+
+/** @category Web APIs */
+declare interface ImageDataSettings {
+ readonly colorSpace?: PredefinedColorSpace;
+}
+
+/** @category Web APIs */
+declare interface ImageData {
+ readonly colorSpace: PredefinedColorSpace;
+ readonly data: Uint8ClampedArray;
+ readonly height: number;
+ readonly width: number;
+}
+
+/** @category Web APIs */
+declare var ImageData: {
+ prototype: ImageData;
+ new (sw: number, sh: number, settings?: ImageDataSettings): ImageData;
+ new (
+ data: Uint8ClampedArray,
+ sw: number,
+ sh?: number,
+ settings?: ImageDataSettings,
+ ): ImageData;
+};