Enforce ComfyExtension types (#1718)

* Enforce extension types

* nit
This commit is contained in:
Chenlei Hu
2024-11-27 12:35:18 -08:00
committed by GitHub
parent 39eaa2e850
commit c4d3c672ad
7 changed files with 27 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
// @ts-strict-ignore
import { app } from '@/scripts/app'
import { api } from '@/scripts/api'
import { useToastStore } from '@/stores/toastStore'
@@ -1308,6 +1309,7 @@ app.registerExtension({
const w = node.widgets.find((w: IWidget) => w.name === 'width')
const h = node.widgets.find((w: IWidget) => w.name === 'height')
// @ts-expect-error hacky override
sceneWidget.serializeValue = async () => {
node.properties['Camera Info'] = JSON.stringify(load3d.getCameraState())
@@ -1595,6 +1597,7 @@ app.registerExtension({
const w = node.widgets.find((w: IWidget) => w.name === 'width')
const h = node.widgets.find((w: IWidget) => w.name === 'height')
// @ts-expect-error hacky override
sceneWidget.serializeValue = async () => {
node.properties['Camera Info'] = JSON.stringify(load3d.getCameraState())