I noticed that the global init() function is not declared as async, which means running await storage.init() returns a Promise that resolves without actually waiting for the LocalStorage.init() function to resolve.
The callback argument of init() doesn't work either since it is passed to LocalStorage.init() that rather expects some options instead of a callback.
So the way init() is implemented now, there is no way to actually wait for the initialisation to complete before accessing the storage. Or am I missing something?
I noticed that the global
init()
function is not declared asasync
, which means runningawait storage.init()
returns a Promise that resolves without actually waiting for theLocalStorage.init()
function to resolve.The
callback
argument ofinit()
doesn't work either since it is passed toLocalStorage.init()
that rather expects some options instead of a callback.So the way
init()
is implemented now, there is no way to actually wait for the initialisation to complete before accessing the storage. Or am I missing something?