fix nodeWebkitAppName type

pull/12/head
mehdi 3 years ago
parent f70b1be64d
commit 7ed4d994da
  1. 2
      index.d.ts
  2. 4
      lib/persistence.js

2
index.d.ts vendored

@ -83,7 +83,7 @@ declare namespace Nedb {
filename?: string; filename?: string;
timestampData?: boolean; timestampData?: boolean;
inMemoryOnly?: boolean; inMemoryOnly?: boolean;
nodeWebkitAppName?: boolean; nodeWebkitAppName?: string;
autoload?: boolean; autoload?: boolean;
onload?(error: Error | null): any; onload?(error: Error | null): any;
beforeDeserialization?(line: string): string; beforeDeserialization?(line: string): string;

@ -16,8 +16,8 @@ class Persistence {
/** /**
* Create a new Persistence object for database options.db * Create a new Persistence object for database options.db
* @param {Datastore} options.db * @param {Datastore} options.db
* @param {Boolean} options.nodeWebkitAppName Optional, specify the name of your NW app if you want options.filename to be relative to the directory where * @param {Number} [options.corruptAlertThreshold] Optional, threshold after which an alert is thrown if too much data is corrupt
* Node Webkit stores application data such as cookies and local storage (the best place to store data in my opinion) * @param {string} [options.nodeWebkitAppName] Optional, specify the name of your NW app if you want options.filename to be relative to the directory where Node Webkit stores application data such as cookies and local storage (the best place to store data in my opinion)
*/ */
constructor (options) { constructor (options) {
this.db = options.db this.db = options.db

Loading…
Cancel
Save