ts-ignore

This commit is contained in:
tbo47
2025-10-07 11:15:30 +00:00
parent 3dd73e724c
commit af231f2f83
2 changed files with 3 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ const canvas = Canvas['default'] || Canvas;
// @ts-ignore // @ts-ignore
global.DOMMatrix = canvas.DOMMatrix; global.DOMMatrix = canvas.DOMMatrix;
// @ts-ignore
(global as any).Path2D ??= class Path2D { (global as any).Path2D ??= class Path2D {
constructor(path: any) { constructor(path: any) {
(this as any).path = path; (this as any).path = path;

View File

@@ -2,8 +2,10 @@ import { Konva } from './_CoreInternals.ts';
// @ts-ignore // @ts-ignore
import { Canvas, DOMMatrix, Image, Path2D } from 'skia-canvas'; import { Canvas, DOMMatrix, Image, Path2D } from 'skia-canvas';
// @ts-ignore
global.DOMMatrix = DOMMatrix as any; global.DOMMatrix = DOMMatrix as any;
// @ts-ignore
global.Path2D = Path2D as any; global.Path2D = Path2D as any;
Path2D.prototype.toString = () => '[object Path2D]'; Path2D.prototype.toString = () => '[object Path2D]';