mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 08:30:06 +00:00
[fix] Remove all declare keywords from class fields
- Remove declare keywords from all litegraph class fields - This fixes Babel TypeScript compilation in Playwright i18n tests - Maintains backward compatibility without useDefineForClassFields
This commit is contained in:
@@ -12,7 +12,7 @@ import type { SubgraphInputNode } from './SubgraphInputNode'
|
||||
* A virtual slot that simply creates a new input slot when connected to.
|
||||
*/
|
||||
export class EmptySubgraphInput extends SubgraphInput {
|
||||
declare parent: SubgraphInputNode
|
||||
parent: SubgraphInputNode
|
||||
|
||||
constructor(parent: SubgraphInputNode) {
|
||||
super(
|
||||
|
||||
@@ -12,7 +12,7 @@ import type { SubgraphOutputNode } from './SubgraphOutputNode'
|
||||
* A virtual slot that simply creates a new output slot when connected to.
|
||||
*/
|
||||
export class EmptySubgraphOutput extends SubgraphOutput {
|
||||
declare parent: SubgraphOutputNode
|
||||
parent: SubgraphOutputNode
|
||||
|
||||
constructor(parent: SubgraphOutputNode) {
|
||||
super(
|
||||
|
||||
@@ -30,7 +30,7 @@ import { isNodeSlot, isSubgraphOutput } from './subgraphUtils'
|
||||
* Functionally, however, when editing a subgraph, that "subgraph input" is the "origin" or "output side" of a link.
|
||||
*/
|
||||
export class SubgraphInput extends SubgraphSlot {
|
||||
declare parent: SubgraphInputNode
|
||||
parent: SubgraphInputNode
|
||||
|
||||
events = new CustomEventTarget<SubgraphInputEventMap>()
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import type { SubgraphInput } from './SubgraphInput'
|
||||
* An instance of a {@link Subgraph}, displayed as a node on the containing (parent) graph.
|
||||
*/
|
||||
export class SubgraphNode extends LGraphNode implements BaseLGraph {
|
||||
declare inputs: (INodeInputSlot & Partial<ISubgraphInput>)[]
|
||||
inputs: (INodeInputSlot & Partial<ISubgraphInput>)[]
|
||||
|
||||
override readonly type: UUID
|
||||
override readonly isVirtualNode = true as const
|
||||
|
||||
@@ -29,7 +29,7 @@ import { isNodeSlot, isSubgraphInput } from './subgraphUtils'
|
||||
* Functionally, however, when editing a subgraph, that "subgraph output" is the "target" or "input side" of a link.
|
||||
*/
|
||||
export class SubgraphOutput extends SubgraphSlot {
|
||||
declare parent: SubgraphOutputNode
|
||||
parent: SubgraphOutputNode
|
||||
|
||||
override connect(
|
||||
slot: INodeOutputSlot,
|
||||
|
||||
@@ -47,8 +47,8 @@ export abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget>
|
||||
/** Minimum gap between label and value */
|
||||
static labelValueGap = 5
|
||||
|
||||
declare computedHeight?: number
|
||||
declare serialize?: boolean
|
||||
computedHeight?: number
|
||||
serialize?: boolean
|
||||
computeLayoutSize?(node: LGraphNode): {
|
||||
minHeight: number
|
||||
maxHeight?: number
|
||||
|
||||
Reference in New Issue
Block a user