Skip to content

BlockSuite API Documentation / @blocksuite/store / ASTWalkerContext

Class: ASTWalkerContext<TNode>

Type Parameters

TNode extends object

Constructors

new ASTWalkerContext()

new ASTWalkerContext<TNode>(): ASTWalkerContext<TNode>

Returns

ASTWalkerContext<TNode>

Properties

_skip

_skip: boolean = false

Defined in

packages/framework/store/src/adapter/context.ts:14


_skipChildrenNum

_skipChildrenNum: number = 0

Defined in

packages/framework/store/src/adapter/context.ts:16

Accessors

stack

Get Signature

get stack(): object[]

Returns

object[]

Defined in

packages/framework/store/src/adapter/context.ts:22

Methods

cleanGlobalContextStack()

cleanGlobalContextStack(key): void

Parameters

key

string

Returns

void

Defined in

packages/framework/store/src/adapter/context.ts:30


closeNode()

closeNode(): ASTWalkerContext<TNode>

Returns

ASTWalkerContext<TNode>

Defined in

packages/framework/store/src/adapter/context.ts:36


currentNode()

currentNode(): TNode

Returns

TNode

Defined in

packages/framework/store/src/adapter/context.ts:51


getGlobalContext()

getGlobalContext(key): unknown

Parameters

key

string

Returns

unknown

Defined in

packages/framework/store/src/adapter/context.ts:55


getGlobalContextStack()

getGlobalContextStack<StackElement>(key): StackElement[]

Type Parameters

StackElement

Parameters

key

string

Returns

StackElement[]

Defined in

packages/framework/store/src/adapter/context.ts:59


getNodeContext()

getNodeContext(key): unknown

Parameters

key

string

Returns

unknown

Defined in

packages/framework/store/src/adapter/context.ts:68


getPreviousNodeContext()

getPreviousNodeContext(key): unknown

Parameters

key

string

Returns

unknown

Defined in

packages/framework/store/src/adapter/context.ts:72


openNode()

openNode(node, parentProp?): ASTWalkerContext<TNode>

Parameters

node

TNode

parentProp?

Keyof<TNode>

Returns

ASTWalkerContext<TNode>

Defined in

packages/framework/store/src/adapter/context.ts:76


previousNode()

previousNode(): TNode

Returns

TNode

Defined in

packages/framework/store/src/adapter/context.ts:85


pushGlobalContextStack()

pushGlobalContextStack<StackElement>(key, value): void

Type Parameters

StackElement

Parameters

key

string

value

StackElement

Returns

void

Defined in

packages/framework/store/src/adapter/context.ts:89


setDefaultProp()

setDefaultProp(parentProp): void

Parameters

parentProp

Keyof<TNode>

Returns

void

Defined in

packages/framework/store/src/adapter/context.ts:18


setGlobalContext()

setGlobalContext(key, value): ASTWalkerContext<TNode>

Parameters

key

string

value

unknown

Returns

ASTWalkerContext<TNode>

Defined in

packages/framework/store/src/adapter/context.ts:98


setGlobalContextStack()

setGlobalContextStack<StackElement>(key, value): void

Type Parameters

StackElement

Parameters

key

string

value

StackElement[]

Returns

void

Defined in

packages/framework/store/src/adapter/context.ts:103


setNodeContext()

setNodeContext(key, value): ASTWalkerContext<TNode>

Parameters

key

string

value

unknown

Returns

ASTWalkerContext<TNode>

Defined in

packages/framework/store/src/adapter/context.ts:107


skipAllChildren()

skipAllChildren(): void

Returns

void

Defined in

packages/framework/store/src/adapter/context.ts:112


skipChildren()

skipChildren(num): void

Parameters

num

number = 1

Returns

void

Defined in

packages/framework/store/src/adapter/context.ts:116