From ce9f36ced16d7abb7b2be4623b6a39b19995b784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Fri, 18 Aug 2023 11:18:58 +0200 Subject: [PATCH] fix: tsdoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- lib/newFileMenu.ts | 9 +++++---- tsconfig.json | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/newFileMenu.ts b/lib/newFileMenu.ts index 0c7155e9..20b57179 100644 --- a/lib/newFileMenu.ts +++ b/lib/newFileMenu.ts @@ -72,12 +72,13 @@ export class NewFileMenu { /** * Get the list of registered entries * - * @param {Folder} context the creation context. Usually the current folder FileInfo + * @param {Folder} context the creation context. Usually the current folder + * @param {View} view the current view */ - public getEntries(context?: Folder): Array { - if (context) { + public getEntries(context?: Folder, view?: View): Array { + if (context && view) { return this._entries - .filter(entry => typeof entry.if === 'function' ? entry.if(context) : true) + .filter(entry => typeof entry.if === 'function' ? entry.if(context, view) : true) } return this._entries } diff --git a/tsconfig.json b/tsconfig.json index 3903dd49..807337f3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,5 +9,6 @@ "strict": true, "noImplicitAny": false, "outDir": "./dist", + "rootDir": "./lib", } }