0.0.1 • Published 1 year ago

@voya-kit/ts-tools v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@voya-kit/ts-tools

类型别名描述定义
AnyPromiseFunction任意类型的异步函数type AnyPromiseFunction = (...args: any[]) => PromiseLike<any>;
AnyNormalFunction任意类型的普通函数type AnyNormalFunction = (...args: any[]) => any;
AnyFunction任意类型的函数(包括异步和普通)type AnyFunction = AnyNormalFunction | AnyPromiseFunction;
Nullable<T>允许 T 类型或 nulltype Nullable<T> = T | null;
NonNullable<T>排除了 nullundefinedT 类型type NonNullable<T> = T extends null | undefined ? never : T;
Recordable<T>字符串键的对象,值为 T 类型type Recordable<T> = Record<string, T>;
ReadonlyRecordable<T>只读的字符串键的对象,值为 T 类型interface ReadonlyRecordable<T = any> { readonly [key: string]: T; }
TimeoutHandlesetTimeout 的返回类型type TimeoutHandle = ReturnType<typeof setTimeout>;
IntervalHandlesetInterval 的返回类型type IntervalHandle = ReturnType<typeof setInterval>;
0.0.1

1 year ago