API > @blocksuite/store > ASTWalker
Class: ASTWalker<ONode, TNode>
​
Constructors ​
constructor ​
new ASTWalker<
ONode
,TNode
>():ASTWalker
<ONode
,TNode
>
Type parameters ​
Parameter |
---|
ONode extends object |
TNode extends object |
Returns ​
ASTWalker
< ONode
, TNode
>
Defined In ​
packages/store/src/adapter/base.ts:89
Properties ​
_enter ​
private
_enter:undefined
|WalkerFn
<ONode
,TNode
>
Defined In ​
packages/store/src/adapter/base.ts:83
_isONode ​
private
_isONode:function
Parameters ​
Parameter | Type |
---|---|
node | unknown |
Returns ​
node is ONode
Defined In ​
packages/store/src/adapter/base.ts:85
_leave ​
private
_leave:undefined
|WalkerFn
<ONode
,TNode
>
Defined In ​
packages/store/src/adapter/base.ts:84
context ​
private
context:ASTWalkerContext
<TNode
>
Defined In ​
packages/store/src/adapter/base.ts:87
Methods ​
_visit ​
private
_visit(o
):Promise
<void
>
Parameters ​
Parameter | Type |
---|---|
o | NodeProps < ONode > |
Returns ​
Promise
< void
>
Defined In ​
packages/store/src/adapter/base.ts:111
setEnter ​
setEnter(
fn
):void
Parameters ​
Parameter | Type |
---|---|
fn | WalkerFn < ONode , TNode > |
Returns ​
void
Defined In ​
packages/store/src/adapter/base.ts:93
setLeave ​
setLeave(
fn
):void
Parameters ​
Parameter | Type |
---|---|
fn | WalkerFn < ONode , TNode > |
Returns ​
void
Defined In ​
packages/store/src/adapter/base.ts:97
setONodeTypeGuard ​
setONodeTypeGuard(
fn
):void
Parameters ​
Parameter | Type |
---|---|
fn | function |
Returns ​
void
Defined In ​
packages/store/src/adapter/base.ts:101
walk ​
walk(
oNode
,tNode
):Promise
<TNode
>
Parameters ​
Parameter | Type |
---|---|
oNode | ONode |
tNode | TNode |
Returns ​
Promise
< TNode
>
Defined In ​
packages/store/src/adapter/base.ts:105