allow null on attrs for NodeType.create methods (#35422)

This commit is contained in:
Jerome Indefenzo
2019-05-20 10:20:55 -07:00
committed by Ryan Cavanaugh
parent fc3ab6fa12
commit 2845af6bbc
+3 -3
View File
@@ -1035,7 +1035,7 @@ export class NodeType<S extends Schema = any> {
* set of marks.
*/
create(
attrs?: { [key: string]: any },
attrs?: { [key: string]: any } | null,
content?: Fragment<S> | ProsemirrorNode<S> | Array<ProsemirrorNode<S>>,
marks?: Array<Mark<S>>
): ProsemirrorNode<S>;
@@ -1045,7 +1045,7 @@ export class NodeType<S extends Schema = any> {
* if it doesn't match.
*/
createChecked(
attrs?: { [key: string]: any },
attrs?: { [key: string]: any } | null,
content?: Fragment<S> | ProsemirrorNode<S> | Array<ProsemirrorNode<S>>,
marks?: Array<Mark<S>>
): ProsemirrorNode<S>;
@@ -1058,7 +1058,7 @@ export class NodeType<S extends Schema = any> {
* `Fragment.empty` as content.
*/
createAndFill(
attrs?: { [key: string]: any },
attrs?: { [key: string]: any } | null,
content?: Fragment<S> | ProsemirrorNode<S> | Array<ProsemirrorNode<S>>,
marks?: Array<Mark<S>>
): ProsemirrorNode<S> | null | undefined;