Skip to content

Commit

Permalink
pass through encoding options
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollon77 committed Jan 22, 2025
1 parent 9cb15e0 commit 70b80bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/types/src/tlv/TlvArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ export class ArraySchema<T> extends TlvSchema<T[]> {
return currentValue;
}

encodeAsChunkedArray(value: T[]): ArrayAsChunked {
encodeAsChunkedArray(value: T[], options?: TlvEncodingOptions): ArrayAsChunked {
const result: ArrayAsChunked = [];
result.push({ listIndex: undefined, element: this.encodeTlv([]) });
result.push({ listIndex: undefined, element: this.encodeTlv([], options) });
value.forEach(element => {
const elementStream = this.elementSchema.encodeTlv(element);
const elementStream = this.elementSchema.encodeTlv(element, options);
result.push({ listIndex: null, element: elementStream });
});
return result;
Expand Down

0 comments on commit 70b80bd

Please sign in to comment.