@zhongguo168a/yxeditor-common 0.0.104 → 0.0.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -723,7 +723,7 @@ declare class Dictionary<K = string, V = any> {
723
723
  * 克隆自身所有项到【target】对象,并返回【target】对象
724
724
  * @param target
725
725
  */
726
- clone(target: this): this;
726
+ clone(target: Dictionary): Dictionary;
727
727
  resetByDict(dict: Dictionary): void;
728
728
  onSet(caller: any, handler: (key: K, value: V) => void): void;
729
729
  onDelete(caller: any, handler: (key: K, value: V) => void): void;
@@ -745,7 +745,7 @@ declare class Dictionary<K = string, V = any> {
745
745
  exist(key: K): boolean;
746
746
  delete(key: K): void;
747
747
  private deleteData;
748
- exists(key: K): boolean;
748
+ exists(keys: K[]): boolean;
749
749
  length(): number;
750
750
  pop(key: K): [V, boolean];
751
751
  isEmpty(): boolean;
package/dist/index.esm.js CHANGED
@@ -2972,8 +2972,14 @@ class Dictionary {
2972
2972
  delete this._data[key];
2973
2973
  this.size--;
2974
2974
  }
2975
- exists(key) {
2976
- return !!this._data[key];
2975
+ exists(keys) {
2976
+ for (let i = 0; i < keys.length; i++) {
2977
+ let key = keys[i];
2978
+ if (!this.exist(key)) {
2979
+ return false;
2980
+ }
2981
+ }
2982
+ return true;
2977
2983
  }
2978
2984
  length() {
2979
2985
  return this.size;