close

inline suspend fun SerialPort.close()(source)

The close() method of the SerialPort interface returns a Promise that resolves when the port closes.

MDN Reference