(name: string, content: CBORValue)
| 80 | } |
| 81 | |
| 82 | private addSection(name: string, content: CBORValue) { |
| 83 | if (this.sectionLengths.some((s) => s.name === name)) { |
| 84 | throw new Error('Duplicated section: ' + name); |
| 85 | } |
| 86 | let length = encodedLength(content); |
| 87 | this.sectionLengths.push({ name, length }); |
| 88 | this.sections.push(content); |
| 89 | } |
| 90 | |
| 91 | // Adds a response to `this.response`, and returns its length in the |
| 92 | // responses section. |
no outgoing calls
no test coverage detected