You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I moved over to using nedb-promises over plain nedb due to their Typescript types having issues. So far, it's been working great. The only thing I've noticed is that calling
database.persistance.compactDatafile()
will print a warning to the console with the following message:
(node:13872) DeprecationWarning: @seald-io/nedb: calling Datastore#persistence#compactDatafile is deprecated, please use Datastore#compactDatafile, it will be removed in the next major version.
This is due to @seald/nedb having marked calls going via .persistence as deprecated. Instead, they want us to call the functions straight on the database object. Like this:
database.compactDatafile()
The nedb-promises types file currently does not expose these functions. But there is a work-around in the mean time, to cast the object to any before making the call. So the method is there, it just isn't exposed.
(databaseasany).compactDatafile();
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I moved over to using nedb-promises over plain nedb due to their Typescript types having issues. So far, it's been working great. The only thing I've noticed is that calling
will print a warning to the console with the following message:
This is due to @seald/nedb having marked calls going via
.persistence
as deprecated. Instead, they want us to call the functions straight on the database object. Like this:The nedb-promises types file currently does not expose these functions. But there is a work-around in the mean time, to cast the object to
any
before making the call. So the method is there, it just isn't exposed.The text was updated successfully, but these errors were encountered: