Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

SchemaSpec

An object describing a schema, as passed to the Schema constructor.

interface SchemaSpec <Nodes extends string = any, Marks extends string = any> {
marks?: [name in Marks]: MarkSpec | OrderedMap<MarkSpec>;
nodes: [name in Nodes]: NodeSpec | OrderedMap<NodeSpec>;
topNode?: string;
}

§Type Parameters

§
Nodes extends string = any
[src]
§
Marks extends string = any
[src]

§Properties

§
marks?: [name in Marks]: MarkSpec | OrderedMap<MarkSpec>
[src]

The mark types that exist in this schema. The order in which they are provided determines the order in which mark sets are sorted and in which parse rules are tried.

§
nodes: [name in Nodes]: NodeSpec | OrderedMap<NodeSpec>
[src]

The node types in this schema. Maps names to NodeSpec objects that describe the node type associated with that name. Their order is significant—it determines which parse rules take precedence by default, and which nodes come first in a given group.

§
topNode?: string
[src]

The name of the default top-level node for the schema. Defaults to "doc".