(id: string)
| 247 | } |
| 248 | |
| 249 | public getPort(id: string): IExePort { |
| 250 | let portIdx = this.portNameToIdx.get(id); |
| 251 | if (isNil(portIdx)) { |
| 252 | let validPortsMsg = 'Valid ports are [' + Array.from(this.portNameToIdx.keys()).join(', ') + ']'; |
| 253 | throw new Error(`Port ${id} not found on component ${this.comp.name} (${this.comp.id}). ` + validPortsMsg); |
| 254 | } |
| 255 | return this.ports[portIdx]; |
| 256 | } |
| 257 | |
| 258 | public createExternalPort(id: string, type: PortType, width: number): IExePort { |
| 259 | let portIdx = this.ports.length; |
no test coverage detected