@cclr/lang 0.1.27 → 0.1.28
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/lib/type/index.d.ts +15 -1
- package/package.json +2 -2
package/lib/type/index.d.ts
CHANGED
|
@@ -18,6 +18,20 @@ type TPlainObject = Record<string, TAny>;
|
|
|
18
18
|
type TPlainFunction = (...args: TAny[]) => TAny;
|
|
19
19
|
type TNoop = () => void;
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* 全部属性变为必填,递归处理
|
|
23
|
+
*/
|
|
24
|
+
type RequireRecursive<T> = {
|
|
25
|
+
[P in keyof T]-?: T[P] extends object ? RequireRecursive<T[P]> : T[P];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 全部属性变为可选,递归处理
|
|
30
|
+
*/
|
|
31
|
+
type PartialRecursive<T> = {
|
|
32
|
+
[P in keyof T]?: T[P] extends object ? PartialRecursive<T[P]> : T[P];
|
|
33
|
+
};
|
|
34
|
+
|
|
21
35
|
declare const VAL_TYPE: {
|
|
22
36
|
readonly boolean: "boolean";
|
|
23
37
|
readonly undefined: "undefined";
|
|
@@ -190,4 +204,4 @@ declare namespace index {
|
|
|
190
204
|
*/
|
|
191
205
|
declare const set: (source: object | null | undefined, path: string, value: any) => object;
|
|
192
206
|
|
|
193
|
-
export { type TAny, type TNoop, type TPlainFunction, type TPlainObject, type TVal, VAL_TYPE, defaultValue, forEach$1 as forEach, forEachReverse, get, getParamType, hasOwn, isArray, isBoolean, isEmpty, isEqual, isFunction, isNull, isNumber, isObject, isPlainObject, isString, isSymbol, isType, isUndefined, isUndefinedOrNull, noop, index as obj, set, toString };
|
|
207
|
+
export { type PartialRecursive, type RequireRecursive, type TAny, type TNoop, type TPlainFunction, type TPlainObject, type TVal, VAL_TYPE, defaultValue, forEach$1 as forEach, forEachReverse, get, getParamType, hasOwn, isArray, isBoolean, isEmpty, isEqual, isFunction, isNull, isNumber, isObject, isPlainObject, isString, isSymbol, isType, isUndefined, isUndefinedOrNull, noop, index as obj, set, toString };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cclr/lang",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"description": "js语言基础工具",
|
|
5
5
|
"author": "cclr <18843152354@163.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"g:test": "vitest run",
|
|
28
28
|
"g:build": "ccf build"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "28145ec7d9bac3bcff8c6d792c72c4da9a4e4f54"
|
|
31
31
|
}
|