Skip to content

Commit

Permalink
fix: Add missing types for getters on files router added with Nextclo…
Browse files Browse the repository at this point in the history
…ud 28

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Jul 2, 2024
1 parent 6c6069c commit f616d2b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/v28/OC.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string | (string | null)[] | null | undefined>
/**
* Params of the current route
*/
readonly params: Nextcloud.v27.Dictionary<string>
}

interface OC extends Omit<Nextcloud.v27.OC, 'appSettings'|'addScript'|'addStyle'> {
/**
* 'appSettings', 'addScript', and 'addStyle' were removed in Nextcloud 28
Expand All @@ -124,7 +139,7 @@ declare namespace Nextcloud.v28 {

interface OCP extends Omit<Nextcloud.v27.OCP, 'Files'> {
Files: {
Router: Nextcloud.v27.FilesRouter
Router: FilesRouter
Navigation: FilesNavigation
}
}
Expand Down

0 comments on commit f616d2b

Please sign in to comment.