File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,12 +82,14 @@ export class DeltaSet {
8282 }
8383
8484 private static DeltaTypeStore : Record < string , DeltaStatic > = { } ;
85+
8586 public static register ( delta : DeltaStatic ) {
8687 if ( ! delta . KEY ) {
8788 throw new TypeError ( "Please implements DeltaStatic Type" ) ;
8889 }
8990 DeltaSet . DeltaTypeStore [ delta . KEY ] = delta ;
9091 }
92+
9193 public static create ( delta : DeltaLike ) {
9294 const DeltaType = DeltaSet . DeltaTypeStore [ delta . key ] ;
9395 return DeltaType ? DeltaType . create ( delta ) : null ;
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export class Op<T extends OpType> {
5555 return null ;
5656 }
5757
58- static from < T extends OpType > ( type : T , payload : OpPayload [ T ] ) {
58+ public static from < T extends OpType > ( type : T , payload : OpPayload [ T ] ) {
5959 return new Op ( type , payload ) ;
6060 }
6161}
You can’t perform that action at this time.
0 commit comments