mixlea-utils-js 0.1.16 → 0.1.17
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/mixlea-utils-js.js +215 -215
- package/dist/mixlea-utils-js.umd.js +2 -2
- package/dist/types/index.d.ts +12 -8
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -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):
|
|
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
|
|
679
|
+
* @param input
|
|
680
680
|
*/
|
|
681
|
-
export declare function isEmpty(
|
|
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
|
|
709
|
+
* @param input
|
|
710
710
|
*/
|
|
711
|
-
export declare function isNotEmpty(
|
|
711
|
+
export declare function isNotEmpty<T>(input: T): input is Exclude<T, VoidLike_3>;
|
|
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
|
|
725
|
+
export declare function isNotVoid(input: any): input is Exclude<unknown, VoidLike_4>;
|
|
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
|
|
768
|
+
export declare function isVoid(input: any): input is VoidLike;
|
|
769
769
|
|
|
770
770
|
export declare function isWebViewBrowser(): boolean;
|
|
771
771
|
|
|
@@ -1387,7 +1387,11 @@ declare type ValueOrFn_2<T> = T | (() => T);
|
|
|
1387
1387
|
|
|
1388
1388
|
declare type VoidLike = null | undefined | '' | [];
|
|
1389
1389
|
|
|
1390
|
-
declare type VoidLike_2 = null | undefined | '' | []
|
|
1390
|
+
declare type VoidLike_2 = null | undefined | '' | [] | Record<string, never>;
|
|
1391
|
+
|
|
1392
|
+
declare type VoidLike_3 = null | undefined | '' | [] | Record<string, never>;
|
|
1393
|
+
|
|
1394
|
+
declare type VoidLike_4 = null | undefined | '' | [];
|
|
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;
|