//#region ../../packages/utils/typescript.d.ts declare const mutable: >(val: T) => Mutable; type Mutable = { -readonly [P in keyof T]: T[P] }; type HTMLElementCustomized = HTMLElement & T; /** * @deprecated stop to use null * @see {@link https://github.com/sindresorhus/meta/discussions/7} */ type Nullable = T | null; type Arrayable = T | T[]; type Awaitable = Promise | T; type Primitive = null | undefined | string | number | boolean | symbol | bigint; type BrowserNativeObject = Date | FileList | File | Blob | RegExp; /** * Check whether it is tuple * * 检查是否为元组 * * @example * IsTuple<[1, 2, 3]> => true * IsTuple => false */ type IsTuple> = number extends T['length'] ? false : true; /** * Array method key * * 数组方法键 */ type ArrayMethodKey = keyof any[]; /** * Tuple index key * * 元组下标键 * * @example * TupleKey<[1, 2, 3]> => '0' | '1' | '2' */ type TupleKey> = Exclude; /** * Array index key * * 数组下标键 */ type ArrayKey = number; /** * Helper type for recursively constructing paths through a type * * 用于通过一个类型递归构建路径的辅助类型 */ type PathImpl = V extends Primitive | BrowserNativeObject ? `${K}` : `${K}` | `${K}.${Path}`; /** * Type which collects all paths through a type * * 通过一个类型收集所有路径的类型 * * @see {@link FieldPath} */ type Path = T extends ReadonlyArray ? IsTuple extends true ? { [K in TupleKey]-?: PathImpl, T[K]> }[TupleKey] : PathImpl : { [K in keyof T]-?: PathImpl, T[K]> }[keyof T]; /** * Type which collects all paths through a type * * 通过一个类型收集所有路径的类型 * * @example * FieldPath<{ 1: number; a: number; b: string; c: { d: number; e: string }; f: [{ value: string }]; g: { value: string }[]; h: Date; i: FileList; j: File; k: Blob; l: RegExp }> => '1' | 'a' | 'b' | 'c' | 'f' | 'g' | 'c.d' | 'c.e' | 'f.0' | 'f.0.value' | 'g.number' | 'g.number.value' | 'h' | 'i' | 'j' | 'k' | 'l' */ type FieldPath = T extends object ? Path : never; type Globals = 'inherit' | 'initial' | 'revert' | 'unset' | 'revert-layer'; type ObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down' | Globals; type ZIndexType = Globals | 'auto' | number; type AlignItems = 'normal' | 'stretch' | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'self-start' | 'self-end' | 'anchor-center' | 'baseline' | 'first baseline' | 'last baseline' | 'safe center' | 'unsafe center' | Globals; //#endregion export { AlignItems, Arrayable, Awaitable, FieldPath, HTMLElementCustomized, Mutable, Nullable, ObjectFit, ZIndexType, mutable };