Skip to content

BlockSuite API Documentation / @blocksuite/store / Boxed

Class: Boxed<T>

Type Parameters

T = unknown

Constructors

new Boxed()

new Boxed<T>(value, onChange?): Boxed<T>

Parameters

value: T

onChange?: OnBoxedChange

Returns

Boxed<T>

Defined in

packages/framework/store/src/reactive/boxed.ts:34

Accessors

yMap

get yMap(): YMap<T>

Returns

YMap<T>

Defined in

packages/framework/store/src/reactive/boxed.ts:30

Methods

bind()

bind(onChange): void

Parameters

onChange: OnBoxedChange

Returns

void

Defined in

packages/framework/store/src/reactive/boxed.ts:52


getValue()

getValue(): undefined | T

Returns

undefined | T

Defined in

packages/framework/store/src/reactive/boxed.ts:22


setValue()

setValue(value): T

Parameters

value: T

Returns

T

Defined in

packages/framework/store/src/reactive/boxed.ts:26


from()

static from<T>(map, onChange?): Boxed<T>

Type Parameters

T

Parameters

map: YMap<T>

onChange?: OnBoxedChange

Returns

Boxed<T>

Defined in

packages/framework/store/src/reactive/boxed.ts:8


is()

static is(value): value is Boxed<unknown>

Parameters

value: unknown

Returns

value is Boxed<unknown>

Defined in

packages/framework/store/src/reactive/boxed.ts:12