Skip to content

Commit b5f3a62

Browse files
committed
chore: adjust types
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 51e9b57 commit b5f3a62

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

lib/dialogs/utils/dialog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import type { InvalidFilenameError } from '@nextcloud/files'
77

8-
import { spawnDialog } from '@nextcloud/dialogs'
8+
import { spawnDialog } from '@nextcloud/vue/functions/dialog'
99
import { validateFilename } from '@nextcloud/files'
1010
import { defineAsyncComponent } from 'vue'
1111

lib/vue-shim.d.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ declare module '*.vue' {
77
export default Vue
88
}
99

10-
declare module '@nextcloud/vue/dist/Components/*.js' {
11-
import Vue from 'vue'
12-
export default Vue
10+
declare module '@nextcloud/vue/functions/dialog' {
11+
import { Component, AsyncComponent } from 'vue'
12+
type SpawnDialogOptions = {
13+
/**
14+
* Container to mount the dialog to
15+
*
16+
* @default document.body
17+
*/
18+
container?: Element | string;
19+
}
20+
export declare function spawnDialog(dialog: Component | AsyncComponent, props?: object, onClose?: (...rest: unknown[]) => void): void
21+
export declare function spawnDialog(dialog: Component | AsyncComponent, props?: object, options?: SpawnDialogOptions, onClose?: (...rest: unknown[]) => void): void
1322
}

0 commit comments

Comments
 (0)