From 7ed4d994da267ee2afaea953c3356cc354f6c62e Mon Sep 17 00:00:00 2001 From: mehdi Date: Wed, 20 Oct 2021 16:20:41 +0200 Subject: [PATCH] fix nodeWebkitAppName type --- index.d.ts | 2 +- lib/persistence.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 2b76bd0..6ff68df 100644 --- a/index.d.ts +++ b/index.d.ts @@ -83,7 +83,7 @@ declare namespace Nedb { filename?: string; timestampData?: boolean; inMemoryOnly?: boolean; - nodeWebkitAppName?: boolean; + nodeWebkitAppName?: string; autoload?: boolean; onload?(error: Error | null): any; beforeDeserialization?(line: string): string; diff --git a/lib/persistence.js b/lib/persistence.js index 088c5cc..51b5050 100755 --- a/lib/persistence.js +++ b/lib/persistence.js @@ -16,8 +16,8 @@ class Persistence { /** * Create a new Persistence object for database 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 - * Node Webkit stores application data such as cookies and local storage (the best place to store data in my opinion) + * @param {Number} [options.corruptAlertThreshold] Optional, threshold after which an alert is thrown if too much data is corrupt + * @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) { this.db = options.db