(port)
| 57 | } |
| 58 | |
| 59 | removePort(port) { |
| 60 | const view = parseViewName(port.name); |
| 61 | if (view.id !== this.id) { |
| 62 | throw new Error('View ID mismatch.'); |
| 63 | } |
| 64 | delete this.ports[view.type]; |
| 65 | if (view.type === this.mainType) { |
| 66 | super.clearPort(); |
| 67 | } |
| 68 | return Object.keys(this.ports).length === 0; |
| 69 | } |
| 70 | |
| 71 | async createPeer(type) { |
| 72 | if (this.peers[type]) { |
no test coverage detected