Skip to content

Commit

Permalink
fix: type defines
Browse files Browse the repository at this point in the history
close #234
  • Loading branch information
Leecason committed Dec 3, 2021
1 parent 1181f77 commit c6cd8ef
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions types/index.d.ts
@@ -1,4 +1,5 @@
import { VueConstructor } from 'vue';
import { default as ElTiptap } from '@/components/ElementTiptap.vue';

export * from './extensions';

Expand All @@ -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;
}
Expand All @@ -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' {
Expand Down

0 comments on commit c6cd8ef

Please sign in to comment.