@zhongguo168a/yxeditor-common 0.0.106 → 0.0.108
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 +6 -4
- package/dist/index.esm.js +7 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -723,8 +723,8 @@ declare class Dictionary<K = string, V = any> {
|
|
|
723
723
|
* 克隆自身所有项到【target】对象,并返回【target】对象
|
|
724
724
|
* @param target
|
|
725
725
|
*/
|
|
726
|
-
clone(target: Dictionary): Dictionary
|
|
727
|
-
resetByDict(dict: Dictionary): void;
|
|
726
|
+
clone(target: Dictionary<K, V>): Dictionary<K, V>;
|
|
727
|
+
resetByDict(dict: Dictionary<K, V>): 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;
|
|
730
730
|
/**
|
|
@@ -827,8 +827,10 @@ declare class DictSource extends Dictionary<string, DictNode> {
|
|
|
827
827
|
}
|
|
828
828
|
|
|
829
829
|
declare class ListIterator {
|
|
830
|
-
break(): void;
|
|
830
|
+
break(reason?: any): void;
|
|
831
831
|
isBreak(): boolean;
|
|
832
|
+
getReason(): any;
|
|
833
|
+
protected _reason: any;
|
|
832
834
|
protected _isBreak: any;
|
|
833
835
|
}
|
|
834
836
|
declare class List<T = any> {
|
|
@@ -843,7 +845,7 @@ declare class List<T = any> {
|
|
|
843
845
|
* @param cond 可以使用【iterator】中断遍历
|
|
844
846
|
* @param removedList 设置后,可获得被移除的项
|
|
845
847
|
*/
|
|
846
|
-
removeByCondition(cond: (index: number, val: T, iterator: ListIterator) => boolean, removedList?: List):
|
|
848
|
+
removeByCondition(cond: (index: number, val: T, iterator: ListIterator) => boolean, removedList?: List<T>): ListIterator;
|
|
847
849
|
/**
|
|
848
850
|
* 查找符合条件的项保存到【target】对象中,并返回【target】对象
|
|
849
851
|
* @param cond 可以使用【iterator】中断遍历
|
package/dist/index.esm.js
CHANGED
|
@@ -3208,12 +3208,16 @@ DictSource.EVENT_REFRESH = "refresh";
|
|
|
3208
3208
|
DictSource.EVENT_TAGS_SET = "tags_set";
|
|
3209
3209
|
|
|
3210
3210
|
class ListIterator {
|
|
3211
|
-
break() {
|
|
3211
|
+
break(reason) {
|
|
3212
3212
|
this._isBreak = true;
|
|
3213
|
+
this._reason = reason;
|
|
3213
3214
|
}
|
|
3214
3215
|
isBreak() {
|
|
3215
3216
|
return this._isBreak;
|
|
3216
3217
|
}
|
|
3218
|
+
getReason() {
|
|
3219
|
+
return this._reason;
|
|
3220
|
+
}
|
|
3217
3221
|
}
|
|
3218
3222
|
class List {
|
|
3219
3223
|
constructor() {
|
|
@@ -3259,6 +3263,7 @@ class List {
|
|
|
3259
3263
|
return iterator;
|
|
3260
3264
|
}
|
|
3261
3265
|
}
|
|
3266
|
+
return iterator;
|
|
3262
3267
|
}
|
|
3263
3268
|
/**
|
|
3264
3269
|
* 移除符合条件的项, 从后往前遍历
|
|
@@ -3280,7 +3285,7 @@ class List {
|
|
|
3280
3285
|
break;
|
|
3281
3286
|
}
|
|
3282
3287
|
}
|
|
3283
|
-
return
|
|
3288
|
+
return iterator;
|
|
3284
3289
|
}
|
|
3285
3290
|
/**
|
|
3286
3291
|
* 查找符合条件的项保存到【target】对象中,并返回【target】对象
|