@zwa73/utils 1.0.148 → 1.0.149
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/UtilInterfaces.d.ts
CHANGED
|
@@ -208,9 +208,9 @@ export type AnyRecord = Record<Keyable, any>;
|
|
|
208
208
|
/**注释元组
|
|
209
209
|
* @template T - 提供注释的类型, 索引需从0开始
|
|
210
210
|
*/
|
|
211
|
-
export type
|
|
211
|
+
export type CmtTuple<T extends {
|
|
212
212
|
[K: number]: unknown;
|
|
213
|
-
}, Tuple extends unknown[] = []> = unknown extends T[Tuple['length']] ? T & Tuple :
|
|
213
|
+
}, Tuple extends unknown[] = []> = unknown extends T[Tuple['length']] ? T & Tuple : CmtTuple<T, [...Tuple, T[Tuple['length']]]>;
|
|
214
214
|
/**非严格模式下将会判断为false的值, 不包含NaN */
|
|
215
215
|
export type Flasy = false | 0 | -0 | "" | null | undefined;
|
|
216
216
|
export {};
|
package/package.json
CHANGED
package/src/UtilInterfaces.ts
CHANGED
|
@@ -300,10 +300,10 @@ export type AnyRecord = Record<Keyable,any>;
|
|
|
300
300
|
/**注释元组
|
|
301
301
|
* @template T - 提供注释的类型, 索引需从0开始
|
|
302
302
|
*/
|
|
303
|
-
export type
|
|
303
|
+
export type CmtTuple<T extends {[K:number]:unknown},Tuple extends unknown[]=[]> =
|
|
304
304
|
unknown extends T[Tuple['length']]
|
|
305
305
|
? T & Tuple
|
|
306
|
-
:
|
|
306
|
+
: CmtTuple<T,[...Tuple,T[Tuple['length']]]>;
|
|
307
307
|
|
|
308
308
|
/**非严格模式下将会判断为false的值, 不包含NaN */
|
|
309
309
|
export type Flasy = false | 0 | -0 | "" | null | undefined;
|