# serial.flush ## Function Flushes the output buffer of an open serial port. ## Syntax ```bt device.open(config).flush() ``` ## Parameters No parameters. ## Return value | Type | Description | | ------ | ------ | | Bool | Returns true if the refresh is successful. | ## Example ```bt port = device.open({type: 'serial', port: 'COM3'}) result = port.flush() // Output: true print result ``` ## Notes - Throws an underlying device error on failure.