-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from nextcloud-libraries/fix/files-types
fix: Adjust `OCP.Files` types for `Navigation` and `Router`
- Loading branch information
Showing
3 changed files
with
164 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
declare namespace Nextcloud.v26 { | ||
|
||
interface OC extends Nextcloud.v25.OC { | ||
interface OC extends Nextcloud.v25.OC { | ||
|
||
} | ||
} | ||
|
||
interface OCP extends Nextcloud.v25.OCP { | ||
interface OCP extends Nextcloud.v25.OCP { | ||
|
||
} | ||
} | ||
|
||
interface WindowWithGlobals extends Nextcloud.Common.DayMonthConstants, Window { | ||
interface WindowWithGlobals extends Nextcloud.Common.DayMonthConstants, Window { | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
import type { Route } from 'vue-router' | ||
|
||
declare global { | ||
namespace Nextcloud.v27 { | ||
interface FilesRouter { | ||
/** | ||
* Trigger a route change on the files app | ||
* | ||
* @param path the url path, eg: '/trashbin?dir=/Deleted' | ||
* @param replace replace the current history (default false) | ||
* @see https://router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location | ||
*/ | ||
goTo(path: string, replace?: boolean): Promise<Route>; | ||
/** | ||
* Trigger a route change on the files App | ||
* | ||
* @param name the route name | ||
* @param params the route parameters | ||
* @param query the url query parameters | ||
* @param replace replace the current history | ||
* @see https://router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location | ||
*/ | ||
goToRoute( | ||
name?: string, | ||
params?: Record<string, string>, | ||
query?: Record<string, string | (string | null)[] | null | undefined>, | ||
replace?: boolean, | ||
): Promise<Route>; | ||
} | ||
namespace Nextcloud.v27 { | ||
interface FilesRouter { | ||
/** | ||
* Trigger a route change on the files app | ||
* | ||
* @param path the url path, eg: '/trashbin?dir=/Deleted' | ||
* @param replace replace the current history (default false) | ||
* @see https://router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location | ||
*/ | ||
goTo(path: string, replace?: boolean): Promise<Route>; | ||
/** | ||
* Trigger a route change on the files App | ||
* | ||
* @param name the route name | ||
* @param params the route parameters | ||
* @param query the url query parameters | ||
* @param replace replace the current history | ||
* @see https://router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location | ||
*/ | ||
goToRoute( | ||
name?: string, | ||
params?: Record<string, string>, | ||
query?: Record<string, string | (string | null)[] | null | undefined>, | ||
replace?: boolean, | ||
): Promise<Route>; | ||
} | ||
|
||
interface OC extends Nextcloud.v26.OC { | ||
interface OC extends Nextcloud.v26.OC { | ||
|
||
} | ||
} | ||
|
||
interface OCP extends Nextcloud.v26.OCP { | ||
Files: { | ||
Router: FilesRouter | ||
} | ||
} | ||
interface OCP extends Omit<Nextcloud.v26.OCP, 'Files'> { | ||
Files: { | ||
Router: FilesRouter | ||
} | ||
} | ||
|
||
interface WindowWithGlobals extends Nextcloud.Common.DayMonthConstants, Window { | ||
interface WindowWithGlobals extends Nextcloud.Common.DayMonthConstants, Window { | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters