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

insertPoint

Try to find a point where a node of the given type can be inserted near pos, by searching up the node hierarchy when pos itself isn't a valid place but is at the start or end of a node. Return null if no position was found.

function insertPoint(
doc: Node,
pos: number,
nodeType: NodeType,
): number | null;
§
insertPoint(doc: Node, pos: number, nodeType: NodeType): number | null
[src]

§Parameters

§
pos: number
[src]
§
nodeType: NodeType
[src]

§Return Type

§
number | null
[src]