scanner diff apply

This commit is contained in:
wyb10a10
2022-07-22 08:30:06 +08:00
parent 71590d0190
commit 2be60d7651
2 changed files with 31 additions and 5 deletions

View File

@@ -187,13 +187,18 @@ export interface ReplicateProperty {
}
/**
* 属性同步器接口抽象Diff的生成
* 属性同步器接口抽象Diff的生成和Diff的应用
*/
export interface IDiffGenerator {
export interface IReplicator {
/**
* 生成一个Diff对象
*/
genDiff(fromVersion: number, toVersion: number): any
/**
* 应用一个Diff对象
* @param diff Diff对象
*/
applyDiff(diff: any): void
/**
* 获取当前版本
*/
@@ -326,7 +331,7 @@ class ReplicateObject {
/**
* 应用DIFF到target中
* @param diff
* @param diff
* @param target
*/
export function applyDiff(diff: any, target: any) {