MCPcopy Create free account
hub / github.com/Comfy-Org/litegraph.js / inputAsSerialisable

Function inputAsSerialisable

src/node/slotUtils.ts:12–23  ·  view source on GitHub ↗
(slot: INodeInputSlot)

Source from the content-addressed store, hash-verified

10}
11
12export function inputAsSerialisable(slot: INodeInputSlot): ISerialisableNodeInput {
13 const { link } = slot
14 const widgetOrPos = slot.widget
15 ? { widget: { name: slot.widget.name } }
16 : { pos: slot.pos }
17
18 return {
19 ...shallowCloneCommonProps(slot),
20 ...widgetOrPos,
21 link,
22 }
23}
24
25export function outputAsSerialisable(slot: INodeOutputSlot & { widget?: IWidget }): ISerialisableNodeOutput {
26 const { pos, slot_index, links, widget } = slot

Callers 2

NodeSlot.test.tsFile · 0.90
serializeMethod · 0.90

Calls 1

shallowCloneCommonPropsFunction · 0.85

Tested by

no test coverage detected