Flush Method
Forces any pending segments to be written to the output stream without closing it.
Syntax
async x12writer.flush(): Promise<void>
Remarks
The Flush method forces the component to write the last created segment to the output stream and then flush the output stream.