From 03cf28037c3b11157c55122129ae337526bc9d29 Mon Sep 17 00:00:00 2001 From: huchenlei Date: Fri, 14 Jun 2024 09:53:01 -0400 Subject: [PATCH] Re-enable tsc --- package.json | 2 +- src/scripts/domWidget.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 77a24cad..082ccf68 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build", + "build": "tsc && vite build", "test": "cd tests-ui && npm run test", "preview": "vite preview" }, diff --git a/src/scripts/domWidget.ts b/src/scripts/domWidget.ts index 9c19c703..d3fdbf7d 100644 --- a/src/scripts/domWidget.ts +++ b/src/scripts/domWidget.ts @@ -193,7 +193,9 @@ function computeSize(size: [number, number]): void { // Override the compute visible nodes function to allow us to hide/show DOM elements when the node goes offscreen const elementWidgets = new Set(); +//@ts-ignore const computeVisibleNodes = LGraphCanvas.prototype.computeVisibleNodes; +//@ts-ignore LGraphCanvas.prototype.computeVisibleNodes = function (): LGraphNode[] { const visibleNodes = computeVisibleNodes.apply(this, arguments); for (const node of app.graph._nodes) { @@ -228,6 +230,7 @@ export function addDomClippingSetting(): void { }); } +//@ts-ignore LGraphNode.prototype.addDOMWidget = function ( name: string, type: string,