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,9 +1,8 @@
import { EditorState } from 'prosemirror-state'
import { Node, NodeType } from 'prosemirror-model'
import getNodeType from './getNodeType'
import { AnyObject } from '../types'
export default function getNodeAttributes(state: EditorState, typeOrName: string | NodeType): AnyObject {
export default function getNodeAttributes(state: EditorState, typeOrName: string | NodeType): Record<string, any> {
const type = getNodeType(typeOrName, state.schema)
const { from, to } = state.selection
let nodes: Node[] = []