(type, sender)
| 124 | } |
| 125 | |
| 126 | export function verifyConnectPermission(type, sender) { |
| 127 | if (type === sender.type) { |
| 128 | return; |
| 129 | } |
| 130 | const {allowedSecondaryTypes} = repo.get(type); |
| 131 | if (!allowedSecondaryTypes.includes(sender.type)) { |
| 132 | throw new Error(`View type ${sender.type} not allowed to connect to controller.`); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | export function isMainComponentType(type, controller) { |
| 137 | for (const entry of repo.entries()) { |