function getIndex (/** @type {[LinkTarget]} */ targets, id) {
            for (let index = 0; index < (targets || []).length; index++) {
                const element = targets[index]
                if (element.id === id) {
                    return index
                }
            }
            return -1
        }
@typedef LinkTarget
@type {object}
@property {string} id - ID of the target node.
@property {string} name - Name of target Node
@property {number} flowId - ID of flow where the target node exists
@property {string} flowName - Name of flow where the target node exists
@property {boolean} isSubFlow - True if the link-in node exists in a subflow instance