mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 02:57:24 +08:00
Merge pull request #17178 from vandenoever/patch-2
prosemirror-model: Make type for nodes and marks more specific
This commit is contained in:
10
types/prosemirror-model/index.d.ts
vendored
10
types/prosemirror-model/index.d.ts
vendored
@@ -236,8 +236,8 @@ declare module "prosemirror-model" {
|
||||
export class Schema {
|
||||
constructor(spec: SchemaSpec)
|
||||
spec: SchemaSpec;
|
||||
nodes: Object;
|
||||
marks: Object;
|
||||
nodes: {[key: string]: NodeType};
|
||||
marks: {[key: string]: MarkType};
|
||||
cached: Object;
|
||||
topNodeType: NodeType;
|
||||
node(type: string | NodeType, attrs?: Object, content?: Fragment | ProsemirrorNode | ProsemirrorNode[], marks?: Mark[]): ProsemirrorNode
|
||||
@@ -252,8 +252,8 @@ declare module "prosemirror-model" {
|
||||
}
|
||||
export class DOMSerializer {
|
||||
constructor(nodes: Object, marks: Object)
|
||||
nodes: Object;
|
||||
marks: Object;
|
||||
nodes: {[key: string]: NodeType};
|
||||
marks: {[key: string]: MarkType};
|
||||
serializeFragment(fragment: Fragment, options?: Object): DocumentFragment
|
||||
serializeNode(node: ProsemirrorNode, options?: Object): Node
|
||||
static renderSpec(doc: Document, structure: DOMOutputSpec): { dom: Node, contentDOM?: Node }
|
||||
@@ -263,4 +263,4 @@ declare module "prosemirror-model" {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user