Skip to content

Commit cdce01b

Browse files
Merge pull request #303 from vue-final/fix/add-missing-types
fix(types): append declare module
2 parents 8a57864 + 68d9a55 commit cdce01b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/vue-final-modal/src/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import VueFinalModal from './components/VueFinalModal/VueFinalModal.vue'
44
import ModalFullscreen from './components/ModalFullscreen/ModalFullscreen.vue'
55
import ModalBottom from './components/ModalBottom/ModalBottom.vue'
66

7+
import type { Vfm } from './Modal'
8+
79
/** Types */
810
export * from './Modal'
911

@@ -30,3 +32,15 @@ export type { ModalBottomEmits } from './components/ModalBottom/ModalBottom.vue'
3032

3133
/** Composables */
3234
export { useVfm, useModal, useVfmAttrs } from './useApi'
35+
36+
declare module '@vue/runtime-core' {
37+
export interface ComponentCustomProperties {
38+
/**
39+
* Vue Final Modal global state for the modal components and also provides
40+
* functions that can be used to control the modal components. @see {Vfm}
41+
*/
42+
$vfm: Vfm
43+
}
44+
}
45+
46+
export { }

0 commit comments

Comments
 (0)