fix: update getJSON return type to JSONContent (#2153)

This commit is contained in:
Jason Galea
2021-11-10 09:24:18 +10:00
committed by GitHub
parent 38b533dc48
commit 6583edeb1f

View File

@@ -22,6 +22,7 @@ import {
EditorOptions, EditorOptions,
CanCommands, CanCommands,
ChainedCommands, ChainedCommands,
JSONContent,
SingleCommands, SingleCommands,
TextSerializer, TextSerializer,
EditorEvents, EditorEvents,
@@ -401,7 +402,7 @@ export class Editor extends EventEmitter<EditorEvents> {
/** /**
* Get the document as JSON. * Get the document as JSON.
*/ */
public getJSON(): Record<string, any> { public getJSON(): JSONContent {
return this.state.doc.toJSON() return this.state.doc.toJSON()
} }