()
| 185 | } |
| 186 | |
| 187 | toUint8Array () { |
| 188 | const encoder = encoding.createEncoder() |
| 189 | encoding.writeVarUint(encoder, 0) // this is a feature flag that we might use in the future |
| 190 | encoding.writeVarUint8Array(encoder, this.keyClockEncoder.toUint8Array()) |
| 191 | encoding.writeVarUint8Array(encoder, this.clientEncoder.toUint8Array()) |
| 192 | encoding.writeVarUint8Array(encoder, this.leftClockEncoder.toUint8Array()) |
| 193 | encoding.writeVarUint8Array(encoder, this.rightClockEncoder.toUint8Array()) |
| 194 | encoding.writeVarUint8Array(encoder, encoding.toUint8Array(this.infoEncoder)) |
| 195 | encoding.writeVarUint8Array(encoder, this.stringEncoder.toUint8Array()) |
| 196 | encoding.writeVarUint8Array(encoder, encoding.toUint8Array(this.parentInfoEncoder)) |
| 197 | encoding.writeVarUint8Array(encoder, this.typeRefEncoder.toUint8Array()) |
| 198 | encoding.writeVarUint8Array(encoder, this.lenEncoder.toUint8Array()) |
| 199 | // @note The rest encoder is appended! (note the missing var) |
| 200 | encoding.writeUint8Array(encoder, encoding.toUint8Array(this.restEncoder)) |
| 201 | return encoding.toUint8Array(encoder) |
| 202 | } |
| 203 | |
| 204 | /** |
| 205 | * @param {ID} id |
no test coverage detected