kriszyp / lmdb-js

Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Other
486 stars 39 forks source link

Incorrect typings with transactionAsync #50

Closed paul-go closed 3 years ago

paul-go commented 3 years ago

The type definition is: transactionAsync<T>(action: () => T): T

But it should be: transactionAsync<T>(action: () => T): Promise<T>

By the way, thank you for the recent addition of async transactions. I know many times in open source, especially with less popular projects, these thoughts "Is anyone going to care?" are common. Well, this feature just got me out of a really tight spot in a mission-critical project.

kriszyp commented 3 years ago

Should be fixed in v1.5.3.