diff --git a/lib/v27/OC.d.ts b/lib/v27/OC.d.ts index 595bfa9..c52353d 100644 --- a/lib/v27/OC.d.ts +++ b/lib/v27/OC.d.ts @@ -35,7 +35,7 @@ declare namespace Nextcloud.v27 { * @see https://v3.router.vuejs.org/guide/essentials/navigation.html */ goToRoute( - name?: string, + name?: string | null, params?: Record, query?: Record, replace?: boolean, 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 } }