import { Node , Schema , NodeType , MarkType , Mark } from "prosemirror-model" ; declare module "prosemirror-model" { interface Fragment { content : Node [ ] ; } interface NodeType < S extends Schema < any , any > > { hasRequiredAttrs ( ) : boolean ; createAndFill ( attrs ? , content ? , marks ? ) : Node ; } interface ResolvedPos { /** Get the position at the given index in the parent node at the given depth (which defaults to this.depth). */ posAtIndex ( index , depth ? ) : number ; } } export interface IDisposable { dispose ( ) : void ; } export type ArrayKeys = keyof any [ ] ; export type Indices < T > = Exclude < keyof T , ArrayKeys > ; export interface ProseSchema < N extends string = string , M extends string = string > extends Schema < N , M > { text ( text , marks ? ) : Node < this > ; /**
    * An object mapping the schema's node names to node type objects.
    */ nodes : { [ name in N ] : ProseNodeType < this > & { name : N ; } ; } ; /**
    * A map from mark names to mark type objects.
    */ marks : { [ name in M ] : ProseMarkType < this > & { name : N ; } ; } ; } export type ProseNodeT < S > = S extends ProseSchema < infer N , any > ? N : never ; export type ProseMarkT < S > = S extends ProseSchema < any , infer M > ? M : never ; /** Like { NodeType } from "prosemirror-model", but more precise. */ export interface ProseNodeType < S extends ProseSchema = ProseSchema , N extends string = ProseNodeT < S > > extends NodeType < S > { name : N ; } /** Like { MarkType } from "prosemirror-model", but more precise. */ export interface ProseMarkType < S extends ProseSchema = ProseSchema , M extends string = ProseMarkT < S > > extends MarkType < S > { name : M ; }