converter: { PbChangeID: typeof ChangeID; bytesToChangeID: ((bytes) => ChangeID); bytesToHex: ((bytes?) => string); bytesToObject: ((bytes?) => CRDTObject); bytesToOperation: ((bytes) => Operation); bytesToSnapshot: (<P>(bytes?) => { presences: Map<ActorID, P>; root: CRDTObject; }); fromChangePack: (<P>(pbPack) => ChangePack<P>); fromChanges: (<P>(pbChanges) => Change<P>[]); fromPresence: (<P>(pbPresence) => P); fromTreeNodes: ((pbTreeNodes) => CRDTTreeNode | undefined); hexToBytes: ((hex) => Uint8Array); hexToVersionVector: ((hex) => VersionVector); objectToBytes: ((obj) => Uint8Array); toChangeID: ((changeID) => PbChangeID); toChangePack: ((pack) => PbChangePack); toHexString: ((bytes) => string); toOperation: ((operation) => PbOperation); toTreeNodes: ((node) => PbTreeNode[]); toUint8Array: ((hex) => Uint8Array); versionVectorToHex: ((vector) => string); } = ... Type declaration
PbChangeID: typeof ChangeID
bytesToChangeID: ((bytes) => ChangeID)
- (bytes): ChangeID
Returns ChangeID
bytesToHex: ((bytes?) => string)
- (bytes?): string
Parameters
Optional
bytes: Uint8Array
Returns string
bytesToObject: ((bytes?) => CRDTObject)
- (bytes?): CRDTObject
Parameters
Optional
bytes: Uint8Array
Returns CRDTObject
bytesToOperation: ((bytes) => Operation)
- (bytes): Operation
Returns Operation
bytesToSnapshot: (<P>(bytes?) => {
presences: Map<ActorID, P>;
root: CRDTObject;
})
- <P>(bytes?): {
presences: Map<ActorID, P>;
root: CRDTObject;
} Parameters
Optional
bytes: Uint8Array
Returns {
presences: Map<ActorID, P>;
root: CRDTObject;
}
presences: Map<ActorID, P>
root: CRDTObject
fromChangePack: (<P>(pbPack) => ChangePack<P>)
- <P>(pbPack): ChangePack<P>
Returns ChangePack<P>
fromChanges: (<P>(pbChanges) => Change<P>[])
fromPresence: (<P>(pbPresence) => P)
- <P>(pbPresence): P
Returns P
fromTreeNodes: ((pbTreeNodes) => CRDTTreeNode | undefined)
- (pbTreeNodes): CRDTTreeNode | undefined
Returns CRDTTreeNode | undefined
hexToBytes: ((hex) => Uint8Array)
- (hex): Uint8Array
Returns Uint8Array
hexToVersionVector: ((hex) => VersionVector)
objectToBytes: ((obj) => Uint8Array)
- (obj): Uint8Array
Returns Uint8Array
toChangeID: ((changeID) => PbChangeID)
- (changeID): PbChangeID
Returns PbChangeID
toChangePack: ((pack) => PbChangePack)
- (pack): PbChangePack
Returns PbChangePack
toHexString: ((bytes) => string)
- (bytes): string
Returns string
toOperation: ((operation) => PbOperation)
- (operation): PbOperation
Returns PbOperation
toTreeNodes: ((node) => PbTreeNode[])
- (node): PbTreeNode[]
Returns PbTreeNode[]
toUint8Array: ((hex) => Uint8Array)
- (hex): Uint8Array
Returns Uint8Array
versionVectorToHex: ((vector) => string)
- (vector): string
Returns string
converter
is a converter that converts the given model to protobuf format. is also used to convert models to bytes and vice versa.