mirror of
https://github.com/nextcloud/server.git
synced 2025-12-18 15:56:14 -05:00
fix(files): Add Sidebar.Tab type in global context
And use proper optional argument syntax for its constructor Signed-off-by: Louis Chmn <louis@chmn.me>
This commit is contained in:
parent
5f1e13b70b
commit
2103410dac
2 changed files with 4 additions and 2 deletions
|
|
@ -22,8 +22,8 @@ export default class Tab {
|
|||
* @param {object} options destructuring object
|
||||
* @param {string} options.id the unique id of this tab
|
||||
* @param {string} options.name the translated tab name
|
||||
* @param {?string} options.icon the icon css class
|
||||
* @param {?string} options.iconSvg the icon in svg format
|
||||
* @param {string} [options.icon] the icon css class
|
||||
* @param {string} [options.iconSvg] the icon in svg format
|
||||
* @param {Function} options.mount function to mount the tab
|
||||
* @param {Function} [options.setIsActive] function to forward the active state of the tab
|
||||
* @param {Function} options.update function to update the tab
|
||||
|
|
|
|||
2
window.d.ts
vendored
2
window.d.ts
vendored
|
|
@ -3,6 +3,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import type Tab from './apps/files/src/models/Tab.js'
|
||||
import type RouterService from './apps/files/src/services/RouterService.ts'
|
||||
import type Settings from './apps/files/src/services/Settings.js'
|
||||
import type Sidebar from './apps/files/src/services/Sidebar.js'
|
||||
|
|
@ -12,6 +13,7 @@ type SidebarAPI = Sidebar & {
|
|||
close: () => void
|
||||
setFullScreenMode: (fullScreen: boolean) => void
|
||||
setShowTagsDefault: (showTagsDefault: boolean) => void
|
||||
Tab: typeof Tab
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
|
|
|||
Loading…
Reference in a new issue