Closed Shaptic closed 4 months ago
When I use the cereal namespace instead of just importing directly from js-xdr this code gets a TypeError:
export function processSpecEntryStream(buffer: Buffer) {
const reader = new cereal.XdrReader(buffer);
const res: xdr.ScSpecEntry[] = [];
while (!reader.eof){
res.push(xdr.ScSpecEntry.read(reader));
}
return res;
}
Argument of type 'XdrReader' is not assignable to parameter of type 'Buffer'.
Type 'XdrReader' is missing the following properties from type 'Buffer': write, toJSON, equals, compare, and 91 more.
93 res.push(xdr.ScSpecEntry.read(reader));
Edit: it still works when I just ts-ignore it, but not sure why it complains when I use the cereal namespace vs importing it directly. Anyway, I don't think its really a problem.
Size Change: +3.07 kB (+0.1%)
Total Size: 3.22 MB
dist/stellar-base.js
dist/stellar-base.min.js
compressed-size-action