From 46d30f454b45e35d7fad3b5e4a5c34fd7be0ad5d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 7 Nov 2025 20:18:33 +0900 Subject: [PATCH] Fix postMessage type error in Web Worker files by adding triple-slash directives (#16761) * Initial plan * Add triple-slash directives to worker files to fix postMessage type error Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- packages/frontend-embed/src/workers/draw-blurhash.ts | 3 +++ packages/frontend-embed/src/workers/test-webgl2.ts | 3 +++ packages/frontend/src/workers/draw-blurhash.ts | 3 +++ packages/frontend/src/workers/test-webgl2.ts | 3 +++ 4 files changed, 12 insertions(+) diff --git a/packages/frontend-embed/src/workers/draw-blurhash.ts b/packages/frontend-embed/src/workers/draw-blurhash.ts index 6e49f6bf66..0f97a525a8 100644 --- a/packages/frontend-embed/src/workers/draw-blurhash.ts +++ b/packages/frontend-embed/src/workers/draw-blurhash.ts @@ -3,6 +3,9 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +/// +/// + import { render } from 'buraha'; const canvas = new OffscreenCanvas(64, 64); diff --git a/packages/frontend-embed/src/workers/test-webgl2.ts b/packages/frontend-embed/src/workers/test-webgl2.ts index b203ebe666..aa512bd959 100644 --- a/packages/frontend-embed/src/workers/test-webgl2.ts +++ b/packages/frontend-embed/src/workers/test-webgl2.ts @@ -3,6 +3,9 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +/// +/// + const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1); // 環境によってはOffscreenCanvasが存在しないため // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition diff --git a/packages/frontend/src/workers/draw-blurhash.ts b/packages/frontend/src/workers/draw-blurhash.ts index 6e49f6bf66..0f97a525a8 100644 --- a/packages/frontend/src/workers/draw-blurhash.ts +++ b/packages/frontend/src/workers/draw-blurhash.ts @@ -3,6 +3,9 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +/// +/// + import { render } from 'buraha'; const canvas = new OffscreenCanvas(64, 64); diff --git a/packages/frontend/src/workers/test-webgl2.ts b/packages/frontend/src/workers/test-webgl2.ts index b203ebe666..aa512bd959 100644 --- a/packages/frontend/src/workers/test-webgl2.ts +++ b/packages/frontend/src/workers/test-webgl2.ts @@ -3,6 +3,9 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +/// +/// + const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1); // 環境によってはOffscreenCanvasが存在しないため // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition