diff --git a/types/index.d.ts b/types/index.d.ts index 4b051fd3..eb9c175a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,4 +1,5 @@ import { VueConstructor } from 'vue'; +import { default as ElTiptap } from '@/components/ElementTiptap.vue'; export * from './extensions'; @@ -7,9 +8,12 @@ export interface OptionsInterface { spellcheck?: boolean; } +export type ElementTiptap = ElTiptap; +export type ElementTiptapPlugin = ElementTiptapPluginInterface; + export interface ElementTiptapPluginInterface { installed: boolean; - install (Vue: VueConstructor, options: OptionsInterface): void; + install(Vue: VueConstructor, options: OptionsInterface): void; spellcheck: boolean; lang: string; } @@ -20,11 +24,13 @@ export interface MenuBtnComponentOptions { componentEvents?: { [key: string]: any }; } -export type MenuBtnViewType = MenuBtnComponentOptions | MenuBtnComponentOptions[]; +export type MenuBtnViewType = + | MenuBtnComponentOptions + | MenuBtnComponentOptions[]; export interface MenuBtnView { // TODO: tiptap menuData - menuBtnView (menuData: any): MenuBtnViewType; + menuBtnView(menuData: any): MenuBtnViewType; } declare module 'vue/types/vue' {