mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
allow arbitrary fields on NodeSpec and MarkSpec (#36062)
* allow null on attrs for NodeType.create methods * allow arbitrary fields on NodeSpec and MarkSpec
This commit is contained in:
committed by
Ben Lichtman
parent
1be50fa5c5
commit
2d55bb107c
8
types/prosemirror-model/index.d.ts
vendored
8
types/prosemirror-model/index.d.ts
vendored
@@ -1245,6 +1245,10 @@ export interface NodeSpec {
|
||||
* to a string representation for debugging (e.g. in error messages).
|
||||
*/
|
||||
toDebugString?: ((node: ProsemirrorNode) => string) | null;
|
||||
/**
|
||||
* Allow specifying arbitrary fields on a NodeSpec.
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
export interface MarkSpec {
|
||||
/**
|
||||
@@ -1293,6 +1297,10 @@ export interface MarkSpec {
|
||||
* `mark` field in the rules is implied.
|
||||
*/
|
||||
parseDOM?: ParseRule[] | null;
|
||||
/**
|
||||
* Allow specifying arbitrary fields on a MarkSpec.
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
/**
|
||||
* Used to [define](#model.NodeSpec.attrs) attributes on nodes or
|
||||
|
||||
Reference in New Issue
Block a user