mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 18:10:08 +00:00
[TS] Fix node constructor signature (#3276)
This commit is contained in:
@@ -19,8 +19,7 @@ app.registerExtension({
|
||||
groupcolor = LGraphCanvas.node_colors.yellow.groupcolor
|
||||
isVirtualNode: boolean
|
||||
|
||||
constructor(title?: string) {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
constructor(title: string) {
|
||||
super(title)
|
||||
if (!this.properties) {
|
||||
this.properties = { text: '' }
|
||||
@@ -58,8 +57,7 @@ app.registerExtension({
|
||||
bgcolor = LGraphCanvas.node_colors.yellow.bgcolor
|
||||
groupcolor = LGraphCanvas.node_colors.yellow.groupcolor
|
||||
|
||||
constructor(title?: string) {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
constructor(title: string) {
|
||||
super(title)
|
||||
if (!this.properties) {
|
||||
this.properties = { text: '' }
|
||||
|
||||
@@ -39,8 +39,7 @@ export class PrimitiveNode extends LGraphNode {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
lastType: string
|
||||
static category: string
|
||||
constructor(title?: string) {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
constructor(title: string) {
|
||||
super(title)
|
||||
this.addOutput('connect to widget input', '*')
|
||||
this.serialize_widgets = true
|
||||
|
||||
@@ -44,8 +44,7 @@ export const useLitegraphService = () => {
|
||||
static nodeData?: ComfyNodeDefV1 & ComfyNodeDefV2
|
||||
static category?: string
|
||||
|
||||
constructor(title?: string) {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
constructor(title: string) {
|
||||
super(title)
|
||||
|
||||
const nodeMinSize = { width: 1, height: 1 }
|
||||
|
||||
Reference in New Issue
Block a user