Skip to content

API > @blocksuite/store > ProxyManager

Class: ProxyManager ​

Constructors ​

constructor ​

new ProxyManager(): ProxyManager

Returns ​

ProxyManager

Properties ​

_proxies ​

private _proxies: WeakMap< Array< unknown > | Map< unknown >, unknown >

Defined In ​

packages/store/src/yjs/proxy.ts:14


readonly ​

readonly: boolean = false

Defined In ​

packages/store/src/yjs/proxy.ts:12

Methods ​

_applyYChanges ​

private _applyYChanges<T>(yData, changes): T

Type parameters ​

ParameterDefault
Tunknown

Parameters ​

ParameterType
yDataArray< unknown > | Map< unknown >
changesfunction

Returns ​

T

Defined In ​

packages/store/src/yjs/proxy.ts:102


_createYArrayProxy ​

private _createYArrayProxy<T>(yArray): T[]

Type parameters ​

ParameterDefault
Tunknown

Parameters ​

ParameterType
yArrayArray< unknown >

Returns ​

T[]

Defined In ​

packages/store/src/yjs/proxy.ts:155


_createYMapProxy ​

private _createYMapProxy<Data>(yMap): Data

Type parameters ​

Parameter
Data extends Record< string, unknown >

Parameters ​

ParameterType
yMapMap< unknown >

Returns ​

Data

Defined In ​

packages/store/src/yjs/proxy.ts:215


_initialize ​

private _initialize(array, yArray): void

Parameters ​

ParameterType
arrayunknown[]
yArrayArray< unknown >

Returns ​

void

Defined In ​

packages/store/src/yjs/proxy.ts:17

private _initialize(object, yMap): void

Parameters ​

ParameterType
objectUnRecord
yMapMap< unknown >

Returns ​

void

Defined In ​

packages/store/src/yjs/proxy.ts:18


_subscribeYArray ​

private _subscribeYArray(arr, yArray): void

Parameters ​

ParameterType
arrunknown[]
yArrayArray< unknown >

Returns ​

void

Defined In ​

packages/store/src/yjs/proxy.ts:33


_subscribeYMap ​

private _subscribeYMap(object, yMap): void

Parameters ​

ParameterType
objectUnRecord
yMapMap< unknown >

Returns ​

void

Defined In ​

packages/store/src/yjs/proxy.ts:71


createYProxy ​

createYProxy<Data>(yAbstract): Data

Type parameters ​

Parameter
Data

Parameters ​

ParameterType
yAbstractArray< unknown > | Map< unknown >

Returns ​

Data

Defined In ​

packages/store/src/yjs/proxy.ts:116


transformData ​

transformData(value, onCreate): unknown

Parameters ​

ParameterType
valueunknown
onCreatefunction

Returns ​

unknown

Defined In ​

packages/store/src/yjs/proxy.ts:139