fix(files): dav Node type declaration

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
skjnldsv 2024-12-10 14:37:44 +01:00
parent 36aaac41e2
commit f1fe382aca
3 changed files with 6 additions and 6 deletions

View file

@ -9,14 +9,14 @@ declare module '@nextcloud/event-bus' {
// mapping of 'event name' => 'event type'
'files:config:updated': { key: string, value: unknown }
'files:favorites:removed': Node
'files:favorites:added': Node
'files:favorites:removed': Node
'files:node:created': Node
'files:node:deleted': Node
'files:node:updated': Node
'files:node:renamed': Node
'files:node:moved': { node: Node, oldSource: string }
'files:node:renamed': Node
'files:node:updated': Node
'files:filter:added': IFileListFilter
'files:filter:removed': string

View file

@ -2,7 +2,7 @@
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { ContentsWithRoot, File, Folder } from '@nextcloud/files'
import type { ContentsWithRoot, File, Folder, Node } from '@nextcloud/files'
import type { FileStat, ResponseDataDetailed } from 'webdav'
import { CancelablePromise } from 'cancelable-promise'
@ -14,7 +14,7 @@ import logger from '../logger.ts'
* Slim wrapper over `@nextcloud/files` `davResultToNode` to allow using the function with `Array.map`
* @param node The node returned by the webdav library
*/
export const resultToNode = (node: FileStat): File | Folder => davResultToNode(node)
export const resultToNode = (node: FileStat): Node => davResultToNode(node)
export const getContents = (path = '/'): CancelablePromise<ContentsWithRoot> => {
const controller = new AbortController()

View file

@ -5,7 +5,7 @@
import type { FileSource, PathOptions, ServicesState, Service } from '../types'
import { defineStore } from 'pinia'
import { dirname } from '@nextcloud/paths'
import { File, FileType, Folder, Node, getNavigation } from '@nextcloud/files'
import { type Node, File, FileType, Folder, getNavigation } from '@nextcloud/files'
import { subscribe } from '@nextcloud/event-bus'
import Vue from 'vue'
import logger from '../logger'