From 3ba3afbea38b9b46b5d164e0d6a374ecd0ef63c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20K=C3=BChn?= Date: Wed, 5 Jan 2022 09:21:54 +0100 Subject: [PATCH] fix: revert type changes for useEditor in vue-3 package --- packages/vue-3/src/useEditor.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/vue-3/src/useEditor.ts b/packages/vue-3/src/useEditor.ts index 20a1c409..2e6a64d1 100644 --- a/packages/vue-3/src/useEditor.ts +++ b/packages/vue-3/src/useEditor.ts @@ -1,15 +1,9 @@ -import { - onMounted, - onBeforeUnmount, - shallowRef, - Ref, -} from 'vue' +import { onMounted, onBeforeUnmount, shallowRef } from 'vue' import { EditorOptions } from '@tiptap/core' import { Editor } from './Editor' -// We set a custom return type. Otherwise TypeScript will throw TS4023. Not sure why. -export const useEditor = (options: Partial = {}): Ref => { - const editor = shallowRef() as Ref +export const useEditor = (options: Partial = {}) => { + const editor = shallowRef() onMounted(() => { editor.value = new Editor(options)