refactor: remove AnyObject type

This commit is contained in:
Philipp Kühn
2021-04-21 09:43:31 +02:00
parent d720d77e8d
commit 1c8ca95de2
64 changed files with 108 additions and 196 deletions

View File

@@ -1,10 +1,10 @@
import { reactive, markRaw, Component } from 'vue'
import { AnyObject, Editor } from '@tiptap/core'
import { Editor } from '@tiptap/core'
import { Editor as ExtendedEditor } from './Editor'
export interface VueRendererOptions {
editor: Editor,
props?: AnyObject,
props?: Record<string, any>,
}
export class VueRenderer {
@@ -18,7 +18,7 @@ export class VueRenderer {
element: Element
props: AnyObject
props: Record<string, any>
constructor(component: Component, { props = {}, editor }: VueRendererOptions) {
this.id = Math.floor(Math.random() * 0xFFFFFFFF).toString()
@@ -44,7 +44,7 @@ export class VueRenderer {
return this.editor.contentComponent?.ctx.$refs[this.id]
}
updateProps(props: AnyObject = {}): void {
updateProps(props: Record<string, any> = {}): void {
Object
.entries(props)
.forEach(([key, value]) => {