From f616d2ba8b63b4b6de3e4c6f1a4bff2d890d065e Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 2 Jul 2024 11:54:34 +0200 Subject: [PATCH] fix: Add missing types for getters on files router added with Nextcloud 28 Signed-off-by: Ferdinand Thiessen --- lib/v28/OC.d.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/v28/OC.d.ts b/lib/v28/OC.d.ts index 9b99c2f..c7b4e7e 100644 --- a/lib/v28/OC.d.ts +++ b/lib/v28/OC.d.ts @@ -116,6 +116,21 @@ declare namespace Nextcloud.v28 { views: View[] } + interface FilesRouter extends Nextcloud.v27.FilesRouter { + /** + * Name of the current route + */ + readonly name: string | null | undefined + /** + * Query options of the current route + */ + readonly query: Nextcloud.v27.Dictionary + /** + * Params of the current route + */ + readonly params: Nextcloud.v27.Dictionary + } + interface OC extends Omit { /** * 'appSettings', 'addScript', and 'addStyle' were removed in Nextcloud 28 @@ -124,7 +139,7 @@ declare namespace Nextcloud.v28 { interface OCP extends Omit { Files: { - Router: Nextcloud.v27.FilesRouter + Router: FilesRouter Navigation: FilesNavigation } }