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>
This commit is contained in:
parent
b300b5b94a
commit
46d30f454b
|
|
@ -3,6 +3,9 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/// <reference lib="esnext" />
|
||||||
|
/// <reference lib="webworker" />
|
||||||
|
|
||||||
import { render } from 'buraha';
|
import { render } from 'buraha';
|
||||||
|
|
||||||
const canvas = new OffscreenCanvas(64, 64);
|
const canvas = new OffscreenCanvas(64, 64);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/// <reference lib="esnext" />
|
||||||
|
/// <reference lib="webworker" />
|
||||||
|
|
||||||
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
|
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
|
||||||
// 環境によってはOffscreenCanvasが存在しないため
|
// 環境によってはOffscreenCanvasが存在しないため
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/// <reference lib="esnext" />
|
||||||
|
/// <reference lib="webworker" />
|
||||||
|
|
||||||
import { render } from 'buraha';
|
import { render } from 'buraha';
|
||||||
|
|
||||||
const canvas = new OffscreenCanvas(64, 64);
|
const canvas = new OffscreenCanvas(64, 64);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/// <reference lib="esnext" />
|
||||||
|
/// <reference lib="webworker" />
|
||||||
|
|
||||||
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
|
const canvas = globalThis.OffscreenCanvas && new OffscreenCanvas(1, 1);
|
||||||
// 環境によってはOffscreenCanvasが存在しないため
|
// 環境によってはOffscreenCanvasが存在しないため
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue