填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

KeyValueDiffer

跟踪对象随时间变化的差异。

A differ that tracks changes made to an object over time.

      
      interface KeyValueDiffer<K, V> {
  diff(object: Map<K, V>): KeyValueChanges<K, V> | null
}
    

方法

计算先前状态和新 object 状态之间的差异。

Compute a difference between the previous state and the new object state.

      
      diff(object: { [key: string]: V; }): KeyValueChanges<string, V> | null
    
参数
object object

包含新值。

containing the new value.

返回值

描述差异的对象。返回值仅在下一次 diff() 调用之前有效。

KeyValueChanges<string, V> | null: an object describing the difference. The return value is only valid until the next diff() invocation.