Skip to content

Commit

Permalink
fix: improve types for generateHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
philippkuehn committed Jun 17, 2021
1 parent c8375aa commit 502b5b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/helpers/generateHTML.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Node } from 'prosemirror-model'
import getSchema from './getSchema'
import getHTMLFromFragment from './getHTMLFromFragment'
import { Extensions } from '../types'
import { Extensions, JSONContent } from '../types'

export default function generateHTML(doc: object, extensions: Extensions): string {
export default function generateHTML(doc: JSONContent, extensions: Extensions): string {
const schema = getSchema(extensions)
const contentNode = Node.fromJSON(schema, doc)

Expand Down
4 changes: 2 additions & 2 deletions packages/html/src/generateHTML.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Extensions, getSchema } from '@tiptap/core'
import { Extensions, getSchema, JSONContent } from '@tiptap/core'
import { Node } from 'prosemirror-model'
import getHTMLFromFragment from './getHTMLFromFragment'

export default function generateHTML(doc: object, extensions: Extensions): string {
export default function generateHTML(doc: JSONContent, extensions: Extensions): string {
const schema = getSchema(extensions)
const contentNode = Node.fromJSON(schema, doc)

Expand Down

0 comments on commit 502b5b1

Please sign in to comment.