* connect this node output to the input of another node BY TYPE * @param slot (could be the number of the slot or the string with the name of the slot) * @param target_node the target node * @param target_slotType the input slot type of the target node * @returns the link_info is created
(
slot: number | string,
target_node: LGraphNode,
target_slotType: ISlotType,
optsIn?: ConnectByTypeOptions,
)
| 2433 | * @returns the link_info is created, otherwise null |
| 2434 | */ |
| 2435 | connectByType( |
| 2436 | slot: number | string, |
| 2437 | target_node: LGraphNode, |
| 2438 | target_slotType: ISlotType, |
| 2439 | optsIn?: ConnectByTypeOptions, |
| 2440 | ): LLink | null { |
| 2441 | const slotIndex = this.findConnectByTypeSlot( |
| 2442 | true, |
| 2443 | target_node, |
| 2444 | target_slotType, |
| 2445 | optsIn, |
| 2446 | ) |
| 2447 | if (slotIndex !== undefined) |
| 2448 | return this.connect(slot, target_node, slotIndex, optsIn?.afterRerouteId) |
| 2449 | |
| 2450 | console.debug("[connectByType]: no way to connect type:", target_slotType, "to node:", target_node) |
| 2451 | return null |
| 2452 | } |
| 2453 | |
| 2454 | /** |
| 2455 | * connect this node input to the output of another node BY TYPE |
no test coverage detected