File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
src/json-crdt/codec/structural/verbose Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export class Decoder {
4848 return this . cVal ( doc , node ) ;
4949 case 'con' :
5050 return this . cCon ( doc , node ) ;
51- case 'tup ' :
51+ case 'vec ' :
5252 return this . cVec ( doc , node ) ;
5353 case 'bin' :
5454 return this . cBin ( doc , node ) ;
@@ -69,7 +69,7 @@ export class Decoder {
6969 return obj ;
7070 }
7171
72- protected cVec ( doc : Model , node : types . TupleJsonCrdtNode ) : nodes . VecNode {
72+ protected cVec ( doc : Model , node : types . VectorJsonCrdtNode ) : nodes . VecNode {
7373 const id = this . cTs ( node . id ) ;
7474 const obj = new nodes . VecNode ( doc , id ) ;
7575 const elements = obj . elements ;
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ export class Encoder {
5454 } ;
5555 }
5656
57- public cVec ( obj : nodes . VecNode ) : types . TupleJsonCrdtNode {
58- const map : types . TupleJsonCrdtNode [ 'map' ] = [ ] ;
57+ public cVec ( obj : nodes . VecNode ) : types . VectorJsonCrdtNode {
58+ const map : types . VectorJsonCrdtNode [ 'map' ] = [ ] ;
5959 const elements = obj . elements ;
6060 const length = elements . length ;
6161 const index = this . model . index ;
@@ -65,7 +65,7 @@ export class Encoder {
6565 else map . push ( this . cNode ( index . get ( element ) ! ) ) ;
6666 }
6767 return {
68- type : 'tup ' ,
68+ type : 'vec ' ,
6969 id : this . cTs ( obj . id ) ,
7070 map,
7171 } ;
Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ export interface ObjectJsonCrdtNode {
5757/**
5858 * Tuple (LWW JSON array) node.
5959 */
60- export interface TupleJsonCrdtNode {
61- type : 'tup ' ;
60+ export interface VectorJsonCrdtNode {
61+ type : 'vec ' ;
6262 id : JsonCrdtTimestamp ;
6363 map : ( null | JsonCrdtNode ) [ ] ;
6464}
@@ -115,7 +115,7 @@ export interface JsonCrdtRgaTombstone {
115115
116116export type JsonCrdtNode =
117117 | ObjectJsonCrdtNode
118- | TupleJsonCrdtNode
118+ | VectorJsonCrdtNode
119119 | ArrayJsonCrdtNode
120120 | StringJsonCrdtNode
121121 | BinaryJsonCrdtNode
You can’t perform that action at this time.
0 commit comments