@pawover/kit 0.0.0-alpha.32 → 0.0.0-alpha.34

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
@@ -46,7 +46,8 @@ declare function arrayDifference<T>(initialList: readonly T[], diffList: readonl
46
46
  * @param initialList 初始数组
47
47
  * @param saveValue 安全值
48
48
  */
49
- declare function arrayFirst<T>(initialList: readonly T[], saveValue?: T): T | undefined;
49
+ declare function arrayFirst<T>(initialList: readonly T[]): T | undefined;
50
+ declare function arrayFirst<T>(initialList: readonly T[], saveValue: T): T;
50
51
  //#endregion
51
52
  //#region src/utils/array/arrayFork.d.ts
52
53
  /**
@@ -75,7 +76,8 @@ declare function arrayIntersection<T>(initialList: readonly T[], diffList: reado
75
76
  * @param initialList 初始数组
76
77
  * @param saveValue 安全值
77
78
  */
78
- declare function arrayLast<T>(initialList: readonly T[], saveValue?: T): T | undefined;
79
+ declare function arrayLast<T>(initialList: readonly T[]): T | undefined;
80
+ declare function arrayLast<T>(initialList: readonly T[], saveValue: T): T;
79
81
  //#endregion
80
82
  //#region src/utils/array/arrayMerge.d.ts
81
83
  /**
@@ -2299,14 +2301,23 @@ declare function isIterable(value: unknown): value is {
2299
2301
  declare function isMap(value: unknown): value is Map<unknown, unknown>;
2300
2302
  declare function isWeakMap(value: unknown): value is WeakMap<AnyObject, unknown>;
2301
2303
  //#endregion
2302
- //#region src/utils/typeof/isNaN.d.ts
2303
- declare function isNaN(value: unknown): value is number;
2304
- //#endregion
2305
2304
  //#region src/utils/typeof/isNull.d.ts
2306
2305
  declare function isNull(value: unknown): value is null;
2307
2306
  //#endregion
2308
2307
  //#region src/utils/typeof/isNumber.d.ts
2309
- declare function isNumber(value: unknown): value is number;
2308
+ /**
2309
+ * 检查 value 是否为 number 类型
2310
+ *
2311
+ * @param value - 待检查值
2312
+ * @param checkNaN - 是否排除 `NaN`,默认为 `true`
2313
+ */
2314
+ declare function isNumber(value: unknown, checkNaN?: boolean): value is number;
2315
+ /**
2316
+ * 检查 value 是否为 NaN
2317
+ *
2318
+ * @param value - 待检查值
2319
+ */
2320
+ declare function isNaN(value: unknown): value is number;
2310
2321
  /**
2311
2322
  * 检查 value 是否为整数
2312
2323
  *
@@ -2316,7 +2327,7 @@ declare function isNumber(value: unknown): value is number;
2316
2327
  declare function isInteger(value: unknown, safeCheck?: boolean): value is number;
2317
2328
  /**
2318
2329
  * 检查 value 是否为正整数
2319
- * - 未考虑 value 为 0 的情况
2330
+ * - 此函数中 `0` 不被视为正整数
2320
2331
  *
2321
2332
  * @param value - 待检查值
2322
2333
  * @param safeCheck - 是否附加安全数检查
@@ -2324,13 +2335,25 @@ declare function isInteger(value: unknown, safeCheck?: boolean): value is number
2324
2335
  declare function isPositiveInteger(value: unknown, safeCheck?: boolean): value is number;
2325
2336
  /**
2326
2337
  * 检查 value 是否为负整数
2327
- * - 未考虑 value 为 0 的情况
2338
+ * - 此函数中 `0` 不被视为负整数
2328
2339
  *
2329
2340
  * @param value - 待检查值
2330
2341
  * @param safeCheck - 是否附加安全数检查
2331
2342
  */
2332
2343
  declare function isNegativeInteger(value: unknown, safeCheck?: boolean): value is number;
2344
+ /**
2345
+ * 检查 value 是否为 Infinity
2346
+ * - 排除 `NaN`
2347
+ *
2348
+ * @param value - 待检查值
2349
+ */
2333
2350
  declare function isInfinity(value: unknown): value is number;
2351
+ /**
2352
+ * 检查 value 是否类似 Infinity
2353
+ * - 排除 `NaN`
2354
+ *
2355
+ * @param value - 待检查值
2356
+ */
2334
2357
  declare function isInfinityLike(value: unknown): boolean;
2335
2358
  //#endregion
2336
2359
  //#region src/utils/typeof/isObject.d.ts