@pawover/kit 0.6.0 → 0.8.0

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.
Files changed (121) hide show
  1. package/README.en.md +123 -0
  2. package/README.md +145 -1
  3. package/entry/eslint-rules.cjs +1 -0
  4. package/entry/eslint-rules.d.cts +1 -0
  5. package/entry/eslint-rules.d.ts +2 -0
  6. package/entry/eslint-rules.js +2 -0
  7. package/entry/hooks-alova.cjs +1 -0
  8. package/entry/hooks-alova.d.cts +1 -0
  9. package/entry/hooks-alova.d.ts +1 -0
  10. package/entry/hooks-alova.js +1 -0
  11. package/entry/hooks-react.cjs +1 -0
  12. package/entry/hooks-react.d.cts +1 -0
  13. package/entry/hooks-react.d.ts +1 -0
  14. package/entry/hooks-react.js +1 -0
  15. package/entry/index.cjs +1 -0
  16. package/entry/index.d.cts +1 -0
  17. package/entry/index.d.ts +1 -0
  18. package/entry/index.js +1 -0
  19. package/entry/math.cjs +1 -0
  20. package/entry/math.d.cts +1 -0
  21. package/entry/math.d.ts +1 -0
  22. package/entry/math.js +1 -0
  23. package/entry/types-react.cjs +1 -0
  24. package/entry/types-react.d.cts +1 -0
  25. package/entry/types-react.d.ts +1 -0
  26. package/entry/types-react.js +1 -0
  27. package/entry/types.cjs +1 -0
  28. package/entry/types.d.cts +1 -0
  29. package/entry/types.d.ts +1 -0
  30. package/entry/types.js +1 -0
  31. package/entry/vite.cjs +1 -0
  32. package/entry/vite.d.cts +1 -0
  33. package/entry/vite.d.ts +1 -0
  34. package/entry/vite.js +1 -0
  35. package/entry/zod.cjs +1 -0
  36. package/entry/zod.d.cts +1 -0
  37. package/entry/zod.d.ts +1 -0
  38. package/entry/zod.js +1 -0
  39. package/package.json +81 -96
  40. package/packages/eslint-rules/dist/core.antfu.cjs +0 -78
  41. package/packages/eslint-rules/dist/core.antfu.d.cts +0 -1
  42. package/packages/eslint-rules/dist/core.antfu.d.ts +0 -74
  43. package/packages/eslint-rules/dist/core.antfu.js +0 -79
  44. package/packages/eslint-rules/dist/core.imports.cjs +0 -59
  45. package/packages/eslint-rules/dist/core.imports.d.cts +0 -1
  46. package/packages/eslint-rules/dist/core.imports.d.ts +0 -61
  47. package/packages/eslint-rules/dist/core.imports.js +0 -59
  48. package/packages/eslint-rules/dist/core.importsSort.cjs +0 -7
  49. package/packages/eslint-rules/dist/core.importsSort.d.cts +0 -1
  50. package/packages/eslint-rules/dist/core.importsSort.d.ts +0 -7
  51. package/packages/eslint-rules/dist/core.importsSort.js +0 -7
  52. package/packages/eslint-rules/dist/core.javascript.cjs +0 -1208
  53. package/packages/eslint-rules/dist/core.javascript.d.cts +0 -1
  54. package/packages/eslint-rules/dist/core.javascript.d.ts +0 -1216
  55. package/packages/eslint-rules/dist/core.javascript.js +0 -1208
  56. package/packages/eslint-rules/dist/core.react.cjs +0 -551
  57. package/packages/eslint-rules/dist/core.react.d.cts +0 -1
  58. package/packages/eslint-rules/dist/core.react.d.ts +0 -551
  59. package/packages/eslint-rules/dist/core.react.js +0 -551
  60. package/packages/eslint-rules/dist/core.reactHooks.cjs +0 -107
  61. package/packages/eslint-rules/dist/core.reactHooks.d.cts +0 -1
  62. package/packages/eslint-rules/dist/core.reactHooks.d.ts +0 -107
  63. package/packages/eslint-rules/dist/core.reactHooks.js +0 -107
  64. package/packages/eslint-rules/dist/core.stylistic.cjs +0 -608
  65. package/packages/eslint-rules/dist/core.stylistic.d.cts +0 -1
  66. package/packages/eslint-rules/dist/core.stylistic.d.ts +0 -595
  67. package/packages/eslint-rules/dist/core.stylistic.js +0 -608
  68. package/packages/eslint-rules/dist/core.typescript.cjs +0 -905
  69. package/packages/eslint-rules/dist/core.typescript.d.cts +0 -1
  70. package/packages/eslint-rules/dist/core.typescript.d.ts +0 -917
  71. package/packages/eslint-rules/dist/core.typescript.js +0 -906
  72. package/packages/eslint-rules/dist/core.vue.cjs +0 -312
  73. package/packages/eslint-rules/dist/core.vue.d.cts +0 -1
  74. package/packages/eslint-rules/dist/core.vue.d.ts +0 -293
  75. package/packages/eslint-rules/dist/core.vue.js +0 -313
  76. package/packages/eslint-rules/dist/index.cjs +0 -126
  77. package/packages/eslint-rules/dist/index.d.cts +0 -1
  78. package/packages/eslint-rules/dist/index.d.ts +0 -113
  79. package/packages/eslint-rules/dist/index.js +0 -126
  80. package/packages/eslint-rules/dist/preset-Bk6lxNP0.cjs +0 -107
  81. package/packages/eslint-rules/dist/preset-CQJST7pW.js +0 -102
  82. package/packages/hooks/dist/alova.cjs +0 -53
  83. package/packages/hooks/dist/alova.d.cts +0 -1
  84. package/packages/hooks/dist/alova.d.ts +0 -33
  85. package/packages/hooks/dist/alova.js +0 -50
  86. package/packages/hooks/dist/index.cjs +0 -0
  87. package/packages/hooks/dist/index.d.cts +0 -1
  88. package/packages/hooks/dist/index.d.ts +0 -1
  89. package/packages/hooks/dist/index.js +0 -0
  90. package/packages/hooks/dist/react.cjs +0 -169
  91. package/packages/hooks/dist/react.d.cts +0 -1
  92. package/packages/hooks/dist/react.d.ts +0 -95
  93. package/packages/hooks/dist/react.js +0 -163
  94. package/packages/types/dist/index.cjs +0 -0
  95. package/packages/types/dist/index.d.cts +0 -1
  96. package/packages/types/dist/index.d.ts +0 -271
  97. package/packages/types/dist/index.js +0 -0
  98. package/packages/types/dist/react.cjs +0 -0
  99. package/packages/types/dist/react.d.cts +0 -1
  100. package/packages/types/dist/react.d.ts +0 -64
  101. package/packages/types/dist/react.js +0 -0
  102. package/packages/utils/dist/index.cjs +0 -2300
  103. package/packages/utils/dist/index.d.cts +0 -1
  104. package/packages/utils/dist/index.d.ts +0 -2740
  105. package/packages/utils/dist/index.js +0 -2287
  106. package/packages/utils/dist/math-BznvO4qI.cjs +0 -1029
  107. package/packages/utils/dist/math-DRbCtLQH.js +0 -1012
  108. package/packages/utils/dist/math.cjs +0 -3
  109. package/packages/utils/dist/math.d.cts +0 -1
  110. package/packages/utils/dist/math.d.ts +0 -60
  111. package/packages/utils/dist/math.js +0 -2
  112. package/packages/utils/dist/vite.cjs +0 -44
  113. package/packages/utils/dist/vite.d.cts +0 -1
  114. package/packages/utils/dist/vite.d.ts +0 -28
  115. package/packages/utils/dist/vite.js +0 -43
  116. package/packages/zod/dist/index.cjs +0 -91
  117. package/packages/zod/dist/index.d.cts +0 -1
  118. package/packages/zod/dist/index.d.ts +0 -57
  119. package/packages/zod/dist/index.js +0 -61
  120. /package/{packages/hooks/dist/metadata.json → entry/hooks-metadata.json} +0 -0
  121. /package/{packages/utils/dist → entry}/metadata.json +0 -0
@@ -1,3 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_math = require("./math-BznvO4qI.cjs");
3
- exports.MathUtil = require_math.MathUtil;
@@ -1 +0,0 @@
1
- export type * from './math.d.ts'
@@ -1,60 +0,0 @@
1
- import { BigNumber, MathExpression, MathJsInstance, Matrix } from "mathjs";
2
- //#region src/math/mathUtil.d.ts
3
- /**
4
- * 数学工具类
5
- * - 基于 [`mathjs`](https://mathjs.org)
6
- */
7
- declare class MathUtil {
8
- /**
9
- * 将任意类型的值转换为 `math.bignumber`
10
- *
11
- * @param mathJsInstance mathJs 实例
12
- * @param value 任意类型的值
13
- * @param fallback 回退值
14
- * @returns 转换后的 BigNumber
15
- * @example
16
- * ```ts
17
- * import { create, all } from "mathjs";
18
- * const math = create(all);
19
- * MathUtil.toBignumber(math, "0.1");
20
- * ```
21
- */
22
- static toBignumber(mathJsInstance: MathJsInstance, value: unknown, fallback?: BigNumber | undefined): BigNumber;
23
- /**
24
- * 将任意类型的值转换为十进制数字字符串
25
- *
26
- * @param mathJsInstance mathJs 实例
27
- * @param value 任意类型的值
28
- * @param precision 精度
29
- * @param isFormat 是否格式化为字符串
30
- * @returns 格式化后的字符串或 BigNumber
31
- * @example
32
- * ```ts
33
- * // 重载 1: isFormat = true (默认)
34
- * MathUtil.toDecimal(math, 0.12345, 2); // "0.12"
35
- *
36
- * // 重载 2: isFormat = false
37
- * MathUtil.toDecimal(math, 0.12345, 2, false); // BigNumber(0.12345)
38
- * ```
39
- */
40
- static toDecimal(mathJsInstance: MathJsInstance, value: unknown, precision?: number | undefined, isFormat?: true | undefined): string;
41
- static toDecimal(mathJsInstance: MathJsInstance, value: unknown, precision?: number | undefined, isFormat?: false | undefined): BigNumber;
42
- /**
43
- * 数学表达式求值
44
- *
45
- * ⚠️ 安全警告:mathjs `evaluate` 存在已知的沙箱逃逸向量,**仅限可信输入**(硬编码表达式或受控参数),
46
- * 切勿直接用于用户提供的表达式。
47
- *
48
- * @param mathJsInstance mathJs 实例
49
- * @param expr 表达式
50
- * @param scope 键值映射
51
- * @returns 计算结果的字符串表示
52
- * @example
53
- * ```ts
54
- * MathUtil.toEvaluate(math, "a + b", { a: 1, b: 2 }); // "3"
55
- * ```
56
- */
57
- static toEvaluate(mathJsInstance: MathJsInstance, expr: MathExpression | Matrix, scope?: Record<string, BigNumber> | undefined): string;
58
- }
59
- //#endregion
60
- export { MathUtil };
@@ -1,2 +0,0 @@
1
- import { t as MathUtil } from "./math-DRbCtLQH.js";
2
- export { MathUtil };
@@ -1,44 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/vite/viteUtil.ts
3
- /**
4
- * Vite 工具类
5
- */
6
- var ViteUtil = class {
7
- /**
8
- * 开发服务器反向代理配置
9
- *
10
- * @param proxyList 代理配置项
11
- * @param options 追加到每个代理项的 Vite `ProxyOptions`
12
- * @returns Vite `server.proxy` 可直接使用的配置对象
13
- * @example
14
- * ```ts
15
- * ViteUtil.toProxy([
16
- * ["/api", "http://localhost:3000"],
17
- * ["/mock", "https://example.com"],
18
- * ]);
19
- * // {
20
- * // "/api": { target: "http://localhost:3000", changeOrigin: true, ws: true, rewrite: [Function] },
21
- * // "/mock": { target: "https://example.com", changeOrigin: true, ws: true, secure: false, rewrite: [Function] }
22
- * // }
23
- * ```
24
- */
25
- static toProxy(proxyList, options) {
26
- const httpsRE = /^https:\/\//;
27
- const result = {};
28
- if (Array.isArray(proxyList)) for (const [prefix, target] of proxyList) {
29
- const isHttps = httpsRE.test(target);
30
- const escapedPrefix = prefix.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
31
- result[prefix] = {
32
- target,
33
- changeOrigin: true,
34
- ws: true,
35
- rewrite: (path) => path.replace(new RegExp(`^${escapedPrefix}`), ""),
36
- ...isHttps ? { secure: false } : {},
37
- ...options
38
- };
39
- }
40
- return result;
41
- }
42
- };
43
- //#endregion
44
- exports.ViteUtil = ViteUtil;
@@ -1 +0,0 @@
1
- export type * from './vite.d.ts'
@@ -1,28 +0,0 @@
1
- import { ProxyOptions } from "vite";
2
- //#region src/vite/viteUtil.d.ts
3
- /**
4
- * Vite 工具类
5
- */
6
- declare class ViteUtil {
7
- /**
8
- * 开发服务器反向代理配置
9
- *
10
- * @param proxyList 代理配置项
11
- * @param options 追加到每个代理项的 Vite `ProxyOptions`
12
- * @returns Vite `server.proxy` 可直接使用的配置对象
13
- * @example
14
- * ```ts
15
- * ViteUtil.toProxy([
16
- * ["/api", "http://localhost:3000"],
17
- * ["/mock", "https://example.com"],
18
- * ]);
19
- * // {
20
- * // "/api": { target: "http://localhost:3000", changeOrigin: true, ws: true, rewrite: [Function] },
21
- * // "/mock": { target: "https://example.com", changeOrigin: true, ws: true, secure: false, rewrite: [Function] }
22
- * // }
23
- * ```
24
- */
25
- static toProxy<L extends [string, string][]>(proxyList: L, options?: ProxyOptions | undefined): Record<string, ProxyOptions>;
26
- }
27
- //#endregion
28
- export { ViteUtil };
@@ -1,43 +0,0 @@
1
- //#region src/vite/viteUtil.ts
2
- /**
3
- * Vite 工具类
4
- */
5
- var ViteUtil = class {
6
- /**
7
- * 开发服务器反向代理配置
8
- *
9
- * @param proxyList 代理配置项
10
- * @param options 追加到每个代理项的 Vite `ProxyOptions`
11
- * @returns Vite `server.proxy` 可直接使用的配置对象
12
- * @example
13
- * ```ts
14
- * ViteUtil.toProxy([
15
- * ["/api", "http://localhost:3000"],
16
- * ["/mock", "https://example.com"],
17
- * ]);
18
- * // {
19
- * // "/api": { target: "http://localhost:3000", changeOrigin: true, ws: true, rewrite: [Function] },
20
- * // "/mock": { target: "https://example.com", changeOrigin: true, ws: true, secure: false, rewrite: [Function] }
21
- * // }
22
- * ```
23
- */
24
- static toProxy(proxyList, options) {
25
- const httpsRE = /^https:\/\//;
26
- const result = {};
27
- if (Array.isArray(proxyList)) for (const [prefix, target] of proxyList) {
28
- const isHttps = httpsRE.test(target);
29
- const escapedPrefix = prefix.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
30
- result[prefix] = {
31
- target,
32
- changeOrigin: true,
33
- ws: true,
34
- rewrite: (path) => path.replace(new RegExp(`^${escapedPrefix}`), ""),
35
- ...isHttps ? { secure: false } : {},
36
- ...options
37
- };
38
- }
39
- return result;
40
- }
41
- };
42
- //#endregion
43
- export { ViteUtil };
@@ -1,91 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let zod = require("zod");
3
- //#region src/server.ts
4
- const id = zod.z.union([zod.z.string().min(1), zod.z.number()]);
5
- const idAllowEmpty = id.nullish();
6
- //#endregion
7
- //#region src/type.ts
8
- /** 空 */
9
- const empty = zod.z.union([zod.z.null(), zod.z.undefined()]);
10
- /** 字符串 */
11
- const string = zod.z.string();
12
- /** 字符串-空 */
13
- const stringEmpty = zod.z.literal("").nullish();
14
- /** 字符串-非空 */
15
- const stringNoEmpty = string.min(1);
16
- /** 字符串-可空 */
17
- const stringAllowEmpty = string.nullish();
18
- /** 数字 */
19
- const number = zod.z.number();
20
- /** 数字-可空 */
21
- const numberAllowEmpty = number.nullish();
22
- /** 整数 */
23
- const integer = number.int();
24
- /** 整数-可空 */
25
- const integerAllowEmpty = integer.nullish();
26
- /** 整数-正整数和零 */
27
- const integerPositive = integer.nonnegative().int();
28
- /** 整数-正整数和零-可空 */
29
- const integerPositiveAllowEmpty = integerPositive.nullish();
30
- /** 整数-负整数和零 */
31
- const integerNegative = integer.nonpositive().int();
32
- /** 整数-负整数和零-可空 */
33
- const integerNegativeAllowEmpty = integerNegative.nullish();
34
- /** 布尔值 */
35
- const boolean = zod.z.boolean();
36
- /** 布尔值-可空 */
37
- const booleanAllowEmpty = boolean.nullish();
38
- /** 大数字 */
39
- const bigint = zod.z.bigint();
40
- /** 大数字-可空 */
41
- const bigintAllowEmpty = bigint.nullish();
42
- /** 大数字-正整数和零 */
43
- const bigintPositive = bigint.nonnegative();
44
- /** 大数字-正整数和零-可空 */
45
- const bigintPositiveAllowEmpty = bigintPositive.nullish();
46
- /** 大数字-负整数和零 */
47
- const bigintNegative = bigint.nonpositive();
48
- /** 大数字-负整数和零-可空 */
49
- const bigintNegativeAllowEmpty = bigintNegative.nullish();
50
- const symbol = zod.z.symbol();
51
- const any = zod.z.any();
52
- const unknown = zod.z.unknown();
53
- const never = zod.z.never();
54
- const propertyKey = zod.z.union([
55
- string,
56
- number,
57
- symbol
58
- ]);
59
- const anyObject = zod.z.record(propertyKey, any);
60
- const plainObject = zod.z.record(propertyKey, unknown);
61
- //#endregion
62
- exports.any = any;
63
- exports.anyObject = anyObject;
64
- exports.bigint = bigint;
65
- exports.bigintAllowEmpty = bigintAllowEmpty;
66
- exports.bigintNegative = bigintNegative;
67
- exports.bigintNegativeAllowEmpty = bigintNegativeAllowEmpty;
68
- exports.bigintPositive = bigintPositive;
69
- exports.bigintPositiveAllowEmpty = bigintPositiveAllowEmpty;
70
- exports.boolean = boolean;
71
- exports.booleanAllowEmpty = booleanAllowEmpty;
72
- exports.empty = empty;
73
- exports.id = id;
74
- exports.idAllowEmpty = idAllowEmpty;
75
- exports.integer = integer;
76
- exports.integerAllowEmpty = integerAllowEmpty;
77
- exports.integerNegative = integerNegative;
78
- exports.integerNegativeAllowEmpty = integerNegativeAllowEmpty;
79
- exports.integerPositive = integerPositive;
80
- exports.integerPositiveAllowEmpty = integerPositiveAllowEmpty;
81
- exports.never = never;
82
- exports.number = number;
83
- exports.numberAllowEmpty = numberAllowEmpty;
84
- exports.plainObject = plainObject;
85
- exports.propertyKey = propertyKey;
86
- exports.string = string;
87
- exports.stringAllowEmpty = stringAllowEmpty;
88
- exports.stringEmpty = stringEmpty;
89
- exports.stringNoEmpty = stringNoEmpty;
90
- exports.symbol = symbol;
91
- exports.unknown = unknown;
@@ -1 +0,0 @@
1
- export type * from './index.d.ts'
@@ -1,57 +0,0 @@
1
- import { z } from "zod";
2
- //#region src/server.d.ts
3
- declare const id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4
- declare const idAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
5
- //#endregion
6
- //#region src/type.d.ts
7
- /** 空 */
8
- declare const empty: z.ZodUnion<readonly [z.ZodNull, z.ZodUndefined]>;
9
- /** 字符串 */
10
- declare const string: z.ZodString;
11
- /** 字符串-空 */
12
- declare const stringEmpty: z.ZodOptional<z.ZodNullable<z.ZodLiteral<"">>>;
13
- /** 字符串-非空 */
14
- declare const stringNoEmpty: z.ZodString;
15
- /** 字符串-可空 */
16
- declare const stringAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
- /** 数字 */
18
- declare const number: z.ZodNumber;
19
- /** 数字-可空 */
20
- declare const numberAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
21
- /** 整数 */
22
- declare const integer: z.ZodNumber;
23
- /** 整数-可空 */
24
- declare const integerAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
- /** 整数-正整数和零 */
26
- declare const integerPositive: z.ZodNumber;
27
- /** 整数-正整数和零-可空 */
28
- declare const integerPositiveAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29
- /** 整数-负整数和零 */
30
- declare const integerNegative: z.ZodNumber;
31
- /** 整数-负整数和零-可空 */
32
- declare const integerNegativeAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
- /** 布尔值 */
34
- declare const boolean: z.ZodBoolean;
35
- /** 布尔值-可空 */
36
- declare const booleanAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
37
- /** 大数字 */
38
- declare const bigint: z.ZodBigInt;
39
- /** 大数字-可空 */
40
- declare const bigintAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodBigInt>>;
41
- /** 大数字-正整数和零 */
42
- declare const bigintPositive: z.ZodBigInt;
43
- /** 大数字-正整数和零-可空 */
44
- declare const bigintPositiveAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodBigInt>>;
45
- /** 大数字-负整数和零 */
46
- declare const bigintNegative: z.ZodBigInt;
47
- /** 大数字-负整数和零-可空 */
48
- declare const bigintNegativeAllowEmpty: z.ZodOptional<z.ZodNullable<z.ZodBigInt>>;
49
- declare const symbol: z.ZodSymbol;
50
- declare const any: z.ZodAny;
51
- declare const unknown: z.ZodUnknown;
52
- declare const never: z.ZodNever;
53
- declare const propertyKey: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>;
54
- declare const anyObject: z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodAny>;
55
- declare const plainObject: z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>;
56
- //#endregion
57
- export { any, anyObject, bigint, bigintAllowEmpty, bigintNegative, bigintNegativeAllowEmpty, bigintPositive, bigintPositiveAllowEmpty, boolean, booleanAllowEmpty, empty, id, idAllowEmpty, integer, integerAllowEmpty, integerNegative, integerNegativeAllowEmpty, integerPositive, integerPositiveAllowEmpty, never, number, numberAllowEmpty, plainObject, propertyKey, string, stringAllowEmpty, stringEmpty, stringNoEmpty, symbol, unknown };
@@ -1,61 +0,0 @@
1
- import { z } from "zod";
2
- //#region src/server.ts
3
- const id = z.union([z.string().min(1), z.number()]);
4
- const idAllowEmpty = id.nullish();
5
- //#endregion
6
- //#region src/type.ts
7
- /** 空 */
8
- const empty = z.union([z.null(), z.undefined()]);
9
- /** 字符串 */
10
- const string = z.string();
11
- /** 字符串-空 */
12
- const stringEmpty = z.literal("").nullish();
13
- /** 字符串-非空 */
14
- const stringNoEmpty = string.min(1);
15
- /** 字符串-可空 */
16
- const stringAllowEmpty = string.nullish();
17
- /** 数字 */
18
- const number = z.number();
19
- /** 数字-可空 */
20
- const numberAllowEmpty = number.nullish();
21
- /** 整数 */
22
- const integer = number.int();
23
- /** 整数-可空 */
24
- const integerAllowEmpty = integer.nullish();
25
- /** 整数-正整数和零 */
26
- const integerPositive = integer.nonnegative().int();
27
- /** 整数-正整数和零-可空 */
28
- const integerPositiveAllowEmpty = integerPositive.nullish();
29
- /** 整数-负整数和零 */
30
- const integerNegative = integer.nonpositive().int();
31
- /** 整数-负整数和零-可空 */
32
- const integerNegativeAllowEmpty = integerNegative.nullish();
33
- /** 布尔值 */
34
- const boolean = z.boolean();
35
- /** 布尔值-可空 */
36
- const booleanAllowEmpty = boolean.nullish();
37
- /** 大数字 */
38
- const bigint = z.bigint();
39
- /** 大数字-可空 */
40
- const bigintAllowEmpty = bigint.nullish();
41
- /** 大数字-正整数和零 */
42
- const bigintPositive = bigint.nonnegative();
43
- /** 大数字-正整数和零-可空 */
44
- const bigintPositiveAllowEmpty = bigintPositive.nullish();
45
- /** 大数字-负整数和零 */
46
- const bigintNegative = bigint.nonpositive();
47
- /** 大数字-负整数和零-可空 */
48
- const bigintNegativeAllowEmpty = bigintNegative.nullish();
49
- const symbol = z.symbol();
50
- const any = z.any();
51
- const unknown = z.unknown();
52
- const never = z.never();
53
- const propertyKey = z.union([
54
- string,
55
- number,
56
- symbol
57
- ]);
58
- const anyObject = z.record(propertyKey, any);
59
- const plainObject = z.record(propertyKey, unknown);
60
- //#endregion
61
- export { any, anyObject, bigint, bigintAllowEmpty, bigintNegative, bigintNegativeAllowEmpty, bigintPositive, bigintPositiveAllowEmpty, boolean, booleanAllowEmpty, empty, id, idAllowEmpty, integer, integerAllowEmpty, integerNegative, integerNegativeAllowEmpty, integerPositive, integerPositiveAllowEmpty, never, number, numberAllowEmpty, plainObject, propertyKey, string, stringAllowEmpty, stringEmpty, stringNoEmpty, symbol, unknown };
File without changes