Skip to content

API > @blocksuite/store > NativeWrapper

Class: NativeWrapper<T> ​

Constructors ​

constructor ​

new NativeWrapper<T>(value): NativeWrapper< T >

Type parameters ​

ParameterDefault
Tunknown

Parameters ​

ParameterType
valueT

Returns ​

NativeWrapper< T >

Defined In ​

packages/store/src/yjs/native-wrapper.ts:17

Properties ​

_map ​

private readonly _map: Map< T >

Defined In ​

packages/store/src/yjs/native-wrapper.ts:6

Accessors ​

yMap ​

get yMap(): Map< T >

Defined In ​

packages/store/src/yjs/native-wrapper.ts:30

Methods ​

getValue ​

getValue(): undefined | T

Returns ​

undefined | T

Defined In ​

packages/store/src/yjs/native-wrapper.ts:38


setValue ​

setValue(value): T

Parameters ​

ParameterType
valueT

Returns ​

T

Defined In ​

packages/store/src/yjs/native-wrapper.ts:34


from ​

static from<T>(map): NativeWrapper< T >

Type parameters ​

Parameter
T

Parameters ​

ParameterType
mapMap< T >

Returns ​

NativeWrapper< T >

Defined In ​

packages/store/src/yjs/native-wrapper.ts:13


is ​

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

Parameters ​

ParameterType
valueunknown

Returns ​

value is NativeWrapper<unknown>

Defined In ​

packages/store/src/yjs/native-wrapper.ts:7