mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 23:04:06 +00:00
Typescript LGraphCanvas (#202)
* Format only * Revert accidental change * Fix redundant falsy check - uninit. var * nit - Refactor const/let * nit - Refactor const/let (manual) * nit - Redeclared params * Add TS types & minor refactor only * Refactor - Clean up / reformat - Add strings.ts helper functions - Remove unused vars & local function params - Simplifies code - Rename vars for clarity - Add TODOs and other comments - Add ts-expect-error * Redirect draw.ts enums to global file (temp.) Should be revisited after TS merge complete Corrects import of types from draw.ts into interfaces * Add measure.ts - move util funcs from Global * Add all imports required for TS conversion * Refactor - TS narrowing * nit - TS types & minor refactor * Add missing types from recent PRs Removes duplicate declarations Fixes some type mismatches * nit - Refactor recent PRs * Revert incorrect decls backported * Remove unused params * Add TS types only * Fix minor TS type coercion issues Also removes redundant code * nit - Refactor * Remove @ts-nocheck * Fix refactor regression - drag link to output Issue was the result of fixing var declared outside of closure * Restore original logic --------- Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
@@ -2,7 +2,6 @@ import type { ContextMenu } from "./ContextMenu"
|
||||
import type { LGraphNode } from "./LGraphNode"
|
||||
import type { LinkDirection, RenderShape } from "./types/globalEnums"
|
||||
import type { LinkId } from "./LLink"
|
||||
import type { SlotDirection } from "./draw"
|
||||
|
||||
export type Dictionary<T> = { [key: string]: T }
|
||||
|
||||
@@ -67,7 +66,7 @@ export type ISlotType = number | string
|
||||
export interface INodeSlot {
|
||||
name: string
|
||||
type: ISlotType
|
||||
dir?: LinkDirection & SlotDirection
|
||||
dir?: LinkDirection
|
||||
removable?: boolean
|
||||
shape?: RenderShape
|
||||
not_subgraph_input?: boolean
|
||||
@@ -126,6 +125,7 @@ export interface IContextMenuOptions {
|
||||
|
||||
export interface IContextMenuValue {
|
||||
title?: string
|
||||
value?: string
|
||||
content: string
|
||||
has_submenu?: boolean
|
||||
disabled?: boolean
|
||||
|
||||
Reference in New Issue
Block a user