export * from './ValueOrFunction'; /** * @description parameters type - P; * @description return type - R; */ export type ReturnFunction = (...args: P) => R; /** * @description parameters type - P */ export type VoidFunction

= ReturnFunction; /** * @description constructor parameters type - P * @description instance type - I */ export type ConstructorFunction = new (...args: P) => I; /** * @description 普通对象 */ export type Dict = Record; /** * @description Asserts that the value is Nil. * @example * `null` or `undefined` */ export type Nil = undefined | null; export type NonUndefined = Exclude; export type NonNil = T extends Nil ? never : T; export type NonNull = T extends null ? never : T; export type Undefinable = T | undefined; export type Optional = Undefinable; export type Nullable = T | null; /** * @description Asserts that the value is a primitive. * @example * `string` or `number` or `boolean` or `symbol` or `bigint` or `null` or `undefined` */ export type Primitive = string | number | boolean | symbol | bigint | null | undefined; /** * @example * `null` or `undefined` or `''` or `0` or `false` */ export type Falsy = Nil | '' | 0 | false;