mixlea-utils-js 0.1.16 → 0.1.18

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.
@@ -462,7 +462,7 @@ export declare function extractWeightInfo(input: string): {
462
462
 
463
463
  export declare function extractWeightInfoToKg(spec: string): number | null;
464
464
 
465
- export declare function findDOMDataBubble(start: any, dataKey: string, end?: any): string | null | undefined;
465
+ export declare function findDOMDataBubble<T extends string>(start: any, dataKey: string, end?: any): T | null | undefined;
466
466
 
467
467
  export declare function findHtmlElementById(id: string, defaultValue?: HTMLElement): HTMLElement | null;
468
468
 
@@ -676,9 +676,9 @@ export declare function isDOM(element: any): any;
676
676
 
677
677
  /**
678
678
  * 判断数据是否为[null, undefind], 数组为空, 字符串为空, 对象为空
679
- * @param val
679
+ * @param input
680
680
  */
681
- export declare function isEmpty(val: any): boolean;
681
+ export declare function isEmpty(input: any): input is VoidLike_2;
682
682
 
683
683
  export declare function isEmptyString(value: any): boolean;
684
684
 
@@ -706,9 +706,9 @@ export declare function isMoreThanZero(val: any): boolean;
706
706
 
707
707
  /**
708
708
  * 判断数据是否不为[null, undefind], 数组不为空, 字符串不为空, 对象不为空
709
- * @param val
709
+ * @param input
710
710
  */
711
- export declare function isNotEmpty(val: any): boolean;
711
+ export declare function isNotEmpty(input: any): input is NotVoidLike;
712
712
 
713
713
  export declare function isNotEmptyArray(arr: any): arr is Array<any>;
714
714
 
@@ -722,7 +722,7 @@ export declare function isNotPlainObject(val: any): boolean;
722
722
 
723
723
  export declare function isNotUndefined(value: any): boolean;
724
724
 
725
- export declare function isNotVoid<T>(input: T): input is Exclude<T, VoidLike_2>;
725
+ export declare function isNotVoid(input: any): input is NotVoidLike_2;
726
726
 
727
727
  export declare function isNullish<T>(value: T | null | undefined): value is null | undefined;
728
728
 
@@ -765,7 +765,7 @@ export declare function isValidDate(input: any): input is Date;
765
765
 
766
766
  export declare function isValidNumber(val: any): boolean;
767
767
 
768
- export declare function isVoid<T>(input: T): input is Extract<T, VoidLike>;
768
+ export declare function isVoid(input: any): input is VoidLike;
769
769
 
770
770
  export declare function isWebViewBrowser(): boolean;
771
771
 
@@ -902,6 +902,10 @@ export declare function multiplyBy(val: Record<string, any>, fields: string[], o
902
902
 
903
903
  declare type NextFunction<T> = (state: T) => T;
904
904
 
905
+ declare type NotVoidLike = object | Map<any, any> | Set<any> | string | number | boolean;
906
+
907
+ declare type NotVoidLike_2 = object | Map<any, any> | Set<any> | string | number | boolean;
908
+
905
909
  declare type Nullable<T> = T | null | undefined;
906
910
 
907
911
  declare type Nullable_2<T> = T | null | undefined;
@@ -1387,7 +1391,7 @@ declare type ValueOrFn_2<T> = T | (() => T);
1387
1391
 
1388
1392
  declare type VoidLike = null | undefined | '' | [];
1389
1393
 
1390
- declare type VoidLike_2 = null | undefined | '' | [];
1394
+ declare type VoidLike_2 = null | undefined | '' | [] | Record<string, never>;
1391
1395
 
1392
1396
  export declare function when<V>(condition: ValueOrFn_2<boolean>, result: ValueOrFn_2<V>): {
1393
1397
  elseWhen(condition: ValueOrFn_2<boolean>, result: ValueOrFn_2<V>): any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mixlea-utils-js",
3
3
  "type": "module",
4
- "version": "0.1.16",
4
+ "version": "0.1.18",
5
5
  "private": false,
6
6
  "license": "Apache-2.0",
7
7
  "exports": {