@zhongguo168a/yxeditor-common 0.0.109 → 0.0.111

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
@@ -676,7 +676,7 @@ declare class ListSource extends EventDispatcher {
676
676
  at(index: number): ListNode;
677
677
  first(): ListNode;
678
678
  last(): ListNode;
679
- length(): number;
679
+ get length(): number;
680
680
  /**
681
681
  * 添加项,无法添加相同的项
682
682
  * @param node
@@ -746,7 +746,7 @@ declare class Dictionary<K = string, V = any> {
746
746
  delete(key: K): void;
747
747
  private deleteData;
748
748
  exists(keys: K[]): boolean;
749
- length(): number;
749
+ get length(): number;
750
750
  pop(key: K): [V, boolean];
751
751
  isEmpty(): boolean;
752
752
  items(): V[];
package/dist/index.esm.js CHANGED
@@ -2669,7 +2669,7 @@ class ListSource extends EventDispatcher {
2669
2669
  last() {
2670
2670
  return this._data[this._data.length - 1];
2671
2671
  }
2672
- length() {
2672
+ get length() {
2673
2673
  return this._data.length;
2674
2674
  }
2675
2675
  /**
@@ -2763,7 +2763,7 @@ class ListSource extends EventDispatcher {
2763
2763
  this.dispatch(ListSource.EVENT_REFRESH, { node: node });
2764
2764
  }
2765
2765
  walk(f) {
2766
- for (let i = 0; i < this.length(); i++) {
2766
+ for (let i = 0; i < this.length; i++) {
2767
2767
  let item = this._data[i];
2768
2768
  if (!f(item)) {
2769
2769
  return false;
@@ -2929,7 +2929,7 @@ class Dictionary {
2929
2929
  }
2930
2930
  }
2931
2931
  addDictionary(other) {
2932
- if (other.length() == 0) {
2932
+ if (other.length == 0) {
2933
2933
  return;
2934
2934
  }
2935
2935
  for (const key in other._data) {
@@ -2939,7 +2939,7 @@ class Dictionary {
2939
2939
  }
2940
2940
  }
2941
2941
  deleteDictionary(other) {
2942
- if (other.length() == 0) {
2942
+ if (other.length == 0) {
2943
2943
  return;
2944
2944
  }
2945
2945
  for (const key in other._data) {
@@ -2981,7 +2981,7 @@ class Dictionary {
2981
2981
  }
2982
2982
  return true;
2983
2983
  }
2984
- length() {
2984
+ get length() {
2985
2985
  return this.size;
2986
2986
  }
2987
2987
  pop(key) {
@@ -2990,7 +2990,7 @@ class Dictionary {
2990
2990
  return [value, value !== undefined];
2991
2991
  }
2992
2992
  isEmpty() {
2993
- return this.length() === 0;
2993
+ return this.length === 0;
2994
2994
  }
2995
2995
  items() {
2996
2996
  const items = [];