@ktjs/shared 0.30.10 → 0.30.11

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
@@ -151,8 +151,11 @@ declare const extractParams: (pattern: string, path: string) => Record<string, s
151
151
  interface KTReactiveLike<T = unknown> {
152
152
  isKT: true;
153
153
  value: T;
154
- addOnChange(fn: (newValue: T, oldValue: T) => void): void;
155
- removeOnChange?(fn: (newValue: T, oldValue: T) => void): boolean;
154
+ addOnChange<K extends string | number | undefined>(
155
+ fn: (newValue: T, oldValue: T) => void,
156
+ key?: K,
157
+ ): K extends undefined ? number : K;
158
+ removeOnChange?(key: string | number): ((newValue: T, oldValue: T) => void) | undefined;
156
159
  }
157
160
 
158
161
  export { $ArrayFrom, $SameValueZero, $applyModel, $arrayDelete, $arrayPushUnique, $assign, $define, $defines, $emptyArray, $emptyFn, $emptyObject, $entries, $forEach, $forEachAsync, $hasOwn, $identity, $is, $isArray, $isNode, $isThenable, $keys, $parseStyle, $random, $toString, buildQuery, emplaceParams, extractParams, normalizePath, parseQuery };
package/dist/index.mjs CHANGED
@@ -222,7 +222,7 @@ const extractParams = (pattern, path) => {
222
222
  };
223
223
 
224
224
  // incase that symbol is not supported
225
- Object.defineProperty(window, '__ktjs__', { value: '0.30.10' });
225
+ Object.defineProperty(window, '__ktjs__', { value: '0.30.11' });
226
226
 
227
227
  export { $ArrayFrom, $SameValueZero, $applyModel, $arrayDelete, $arrayPushUnique, $assign, $define, $defines, $emptyArray, $emptyFn, $emptyObject, $entries, $forEach, $forEachAsync, $hasOwn, $identity, $is, $isArray, $isNode, $isThenable, $keys, $parseStyle, $random, $toString, buildQuery, emplaceParams, extractParams, normalizePath, parseQuery };
228
228
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/shared",
3
- "version": "0.30.10",
3
+ "version": "0.30.11",
4
4
  "description": "Shared utilities and cached native methods for kt.js framework",
5
5
  "description_zh": "kt.js 框架的共享工具与原生方法缓存。",
6
6
  "type": "module",