refactoring

This commit is contained in:
Philipp Kühn
2021-01-23 22:48:34 +01:00
parent 71376f6de7
commit 56417a44a7
7 changed files with 34 additions and 25 deletions

View File

@@ -4,7 +4,7 @@ import {
Schema,
} from 'prosemirror-model'
export function createCell(cellType: NodeType, cellContent?: Fragment<Schema> | ProsemirrorNode<Schema> | Array<ProsemirrorNode<Schema>>) {
export function createCell(cellType: NodeType, cellContent?: Fragment<Schema> | ProsemirrorNode<Schema> | Array<ProsemirrorNode<Schema>>): ProsemirrorNode | null | undefined {
if (cellContent) {
return cellType.createChecked(null, cellContent)
}