Similarly to the reason conditionalWrite was introducted, it would be really nice if we were not forced to break the chain and introduce a for-of loop with a single writeLine call.
Something along the lines of the following would be great.
const indexes = [5, 9, 10, 15, 17]
writer
.writeLine(`return [`)
.iterateWriteLine(indexes, index => `this.array[${index}],`)
.writeLine(`]`)
Similarly to the reason
conditionalWritewas introducted, it would be really nice if we were not forced to break the chain and introduce afor-ofloop with a singlewriteLinecall.Something along the lines of the following would be great.