(accessor: string, flagAccessor: string)
| 370 | } |
| 371 | |
| 372 | protected writeElementsHeader(accessor: string, flagAccessor: string) { |
| 373 | const item = this.scope.uniqueName("item"); |
| 374 | const stmts = []; |
| 375 | stmts.push(` |
| 376 | for (const ${item} of ${accessor}) { |
| 377 | if (${item} === null || ${item} === undefined) { |
| 378 | ${flagAccessor} |= ${CollectionFlags.HAS_NULL}; |
| 379 | break; |
| 380 | } |
| 381 | } |
| 382 | `); |
| 383 | stmts.push(`${this.builder.writer.writeUint8(flagAccessor)}`); |
| 384 | return stmts.join("\n"); |
| 385 | } |
| 386 | |
| 387 | writeSpecificType(accessor: string): string { |
| 388 | const item = this.scope.uniqueName("item"); |
nothing calls this directly
no test coverage detected