(slot: INodeInputSlot)
| 10 | } |
| 11 | |
| 12 | export 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 | |
| 25 | export function outputAsSerialisable(slot: INodeOutputSlot & { widget?: IWidget }): ISerialisableNodeOutput { |
| 26 | const { pos, slot_index, links, widget } = slot |
no test coverage detected