Skip to content

BlockSuite API Documentation / @blocksuite/store / ASTWalker

Class: ASTWalker<ONode, TNode>

Type parameters

ONode extends object

TNode extends object | never

Constructors

new ASTWalker(undefined)

new ASTWalker<ONode, TNode>(): ASTWalker<ONode, TNode>

Returns

ASTWalker<ONode, TNode>

Source

packages/framework/store/src/adapter/base.ts:97

Properties

_enter

private _enter: undefined | WalkerFn<ONode, TNode>

Source

packages/framework/store/src/adapter/base.ts:91


_isONode

private _isONode: (node) => node is ONode

Parameters

node: unknown

Returns

node is ONode

Source

packages/framework/store/src/adapter/base.ts:93


_leave

private _leave: undefined | WalkerFn<ONode, TNode>

Source

packages/framework/store/src/adapter/base.ts:92


context

private context: ASTWalkerContext<TNode>

Source

packages/framework/store/src/adapter/base.ts:95

Methods

_visit()

private _visit(o): Promise<void>

Parameters

o: NodeProps<ONode>

Returns

Promise<void>

Source

packages/framework/store/src/adapter/base.ts:124


setEnter()

setEnter(fn): void

Parameters

fn: WalkerFn<ONode, TNode>

Returns

void

Source

packages/framework/store/src/adapter/base.ts:101


setLeave()

setLeave(fn): void

Parameters

fn: WalkerFn<ONode, TNode>

Returns

void

Source

packages/framework/store/src/adapter/base.ts:105


setONodeTypeGuard()

setONodeTypeGuard(fn): void

Parameters

fn: (node) => node is ONode

Returns

void

Source

packages/framework/store/src/adapter/base.ts:109


walk()

walk(oNode, tNode): Promise<TNode>

Parameters

oNode: ONode

tNode: TNode

Returns

Promise<TNode>

Source

packages/framework/store/src/adapter/base.ts:113


walkONode()

walkONode(oNode): Promise<void>

Parameters

oNode: ONode

Returns

Promise<void>

Source

packages/framework/store/src/adapter/base.ts:120


Generated using TypeDoc and typedoc-plugin-markdown.