fix(types): fix link and table type errors (#3208)
This commit is contained in:
@@ -5,8 +5,8 @@ import { getTableNodeTypes } from './getTableNodeTypes'
|
||||
|
||||
export function createTable(schema: Schema, rowsCount: number, colsCount: number, withHeaderRow: boolean, cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>): ProsemirrorNode {
|
||||
const types = getTableNodeTypes(schema)
|
||||
const headerCells = []
|
||||
const cells = []
|
||||
const headerCells: ProsemirrorNode[] = []
|
||||
const cells: ProsemirrorNode[] = []
|
||||
|
||||
for (let index = 0; index < colsCount; index += 1) {
|
||||
const cell = createCell(types.cell, cellContent)
|
||||
@@ -24,7 +24,7 @@ export function createTable(schema: Schema, rowsCount: number, colsCount: number
|
||||
}
|
||||
}
|
||||
|
||||
const rows = []
|
||||
const rows: ProsemirrorNode[] = []
|
||||
|
||||
for (let index = 0; index < rowsCount; index += 1) {
|
||||
rows.push(types.row.createChecked(null, withHeaderRow && index === 0 ? headerCells : cells))
|
||||
|
||||
Reference in New Issue
Block a user