import Vue from 'vue'; import ToastuiEditor from '@toast-ui/editor'; import ToastuiEditorViewer from '@toast-ui/editor/dist/toastui-editor-viewer'; type FunctionKeys = { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]; type EditorFnKeys = FunctionKeys; type ViewerFnKeys = FunctionKeys; export class Editor extends Vue { invoke( fname: T, ...args: Parameters ): ReturnType; getRootElement(): HTMLElement; } export class Viewer extends Vue { invoke( fname: T, ...args: Parameters ): ReturnType; getRootElement(): HTMLElement; }