Merge pull request #1981 from tbo47/ts-ignore
Some checks failed
Test Browser / build (20.x) (push) Has been cancelled
Test NodeJS / build (23.x) (push) Has been cancelled

add ts-ignore to allow tsc to work
This commit is contained in:
Anton Lavrenov
2025-10-07 15:59:28 -05:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

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

View File

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