BytesWriter constructor compilation was failing with message:
ERROR TS2564: Property '~lib/@btc-vision/btc-runtime/runtime/buffer/BytesWriter/BytesWriter#buffer' has no initializer and is not assigned in the con
structor before 'this' is used or returned.
:
28 │ private buffer: DataView;
│ ~~~~~~
└─ in ~lib/@btc-vision/btc-runtime/runtime/buffer/BytesWriter.ts(28,13)
:
38 │ this.buffer = new DataView(this.arrayBuffer);
│ ~~~~~~~~~~~~~~~~
└─ in ~lib/@btc-vision/btc-runtime/runtime/buffer/BytesWriter.ts(38,36)
Fixed by instantiating intermediate objects in the constructor of BytesWriter prior to assignment to this.
Additionally, BytesReader#readTuple() does not actually compile when used for the error from asc:
ERROR TS2365: Operator '<' cannot be applied to types 'i32' and 'u32'.
:
113 │ for (let i = 0; i < length; i++) {
│ ~~~~~~~~~~
└─ in ~lib/@btc-vision/btc-runtime/runtime/buffer/BytesReader.ts(113,25)
BytesWriter constructor compilation was failing with message:
Fixed by instantiating intermediate objects in the constructor of BytesWriter prior to assignment to this.
Additionally, BytesReader#readTuple() does not actually compile when used for the error from asc:
Fixed by typing as a u32.