BlockSuite API Documentation / @blocksuite/store / ASTWalker
Class: ASTWalker<ONode, TNode>
Type parameters
• ONode extends object
• TNode extends object
| never
Constructors
new ASTWalker()
new ASTWalker<
ONode
,TNode
>():ASTWalker
<ONode
,TNode
>
Returns
ASTWalker
<ONode
, TNode
>
Source
packages/framework/store/src/adapter/base.ts:104
Properties
_enter
private
_enter:undefined
|WalkerFn
<ONode
,TNode
>
Source
packages/framework/store/src/adapter/base.ts:98
_isONode()
private
_isONode: (node
) =>node is ONode
Parameters
• node: unknown
Returns
node is ONode
Source
packages/framework/store/src/adapter/base.ts:100
_leave
private
_leave:undefined
|WalkerFn
<ONode
,TNode
>
Source
packages/framework/store/src/adapter/base.ts:99
context
private
context:ASTWalkerContext
<TNode
>
Source
packages/framework/store/src/adapter/base.ts:102
Methods
_visit()
private
_visit(o
):Promise
<void
>
Parameters
• o: NodeProps
<ONode
>
Returns
Promise
<void
>
Source
packages/framework/store/src/adapter/base.ts:131
setEnter()
setEnter(
fn
):void
Parameters
• fn: WalkerFn
<ONode
, TNode
>
Returns
void
Source
packages/framework/store/src/adapter/base.ts:108
setLeave()
setLeave(
fn
):void
Parameters
• fn: WalkerFn
<ONode
, TNode
>
Returns
void
Source
packages/framework/store/src/adapter/base.ts:112
setONodeTypeGuard()
setONodeTypeGuard(
fn
):void
Parameters
• fn
Returns
void
Source
packages/framework/store/src/adapter/base.ts:116
walk()
walk(
oNode
,tNode
):Promise
<TNode
>
Parameters
• oNode: ONode
• tNode: TNode
Returns
Promise
<TNode
>
Source
packages/framework/store/src/adapter/base.ts:120
walkONode()
walkONode(
oNode
):Promise
<void
>
Parameters
• oNode: ONode
Returns
Promise
<void
>
Source
packages/framework/store/src/adapter/base.ts:127