@devlander/utils
Version:
Comprehensive JavaScript and TypeScript utilities for seamless development. Includes object manipulation, data validation, and more.
12 lines (11 loc) • 675 B
TypeScript
export type ObjectIndexType = string | number | symbol;
export type AnyObject = {
[key: ObjectIndexType]: any;
} & Record<string, any>;
export type PrimitiveType = number | string | boolean | symbol | bigint;
export type NestedValueType = PrimitiveType | AnyObject;
export type NestedRecord = Record<string, NestedValueType>;
export type MergeableValue = NestedValueType | NestedRecord | MergeableValue[] | null | undefined;
export type MergedValue = MergeableValue | Record<string, MergeableValue>;
export type OptionalMergeableObject = Record<string, MergeableValue> | undefined | null;
export type MergeableInput = OptionalMergeableObject | OptionalMergeableObject[];