close

fun close()(source)

The close() method of the IDBDatabase interface returns immediately and closes the connection in a separate thread.

MDN Reference