(array, filled, typeMapping, chunk)
| 760 | } |
| 761 | |
| 762 | #decodeArrayItems(array, filled, typeMapping, chunk) { |
| 763 | for (let i = filled; i < array.length; i++) { |
| 764 | if (this.#cursor >= chunk.length) { |
| 765 | return this.#decodeArrayItems.bind( |
| 766 | this, |
| 767 | array, |
| 768 | i, |
| 769 | typeMapping |
| 770 | ); |
| 771 | } |
| 772 | |
| 773 | const item = this.#decodeNestedType(typeMapping, chunk); |
| 774 | if (typeof item === 'function') { |
| 775 | return this.#continueDecodeArrayItems.bind( |
| 776 | this, |
| 777 | array, |
| 778 | i, |
| 779 | item, |
| 780 | typeMapping |
| 781 | ); |
| 782 | } |
| 783 | |
| 784 | array[i] = item; |
| 785 | } |
| 786 | |
| 787 | return array; |
| 788 | } |
| 789 | |
| 790 | #continueDecodeArrayItems(array, filled, itemCb, typeMapping, chunk) { |
| 791 | const item = itemCb(chunk); |
no test coverage detected