declare type Path = string | number; interface ITheme { [key: string]: any; [key: number]: any; } interface Props { [key: string]: any; [key: number]: any; theme?: T; } /** * Identity function. */ declare const identity: (x: T) => T; /** * Check if a value is not null and not undefined. */ declare const is: (n: T) => n is Exclude; /** * Check if a value is a number. */ declare const num: (n: unknown) => n is number; /** * Check if a value is a string. */ declare const string: (n: unknown) => n is string; /** * Check if a value is an object. */ declare const obj: (n: unknown) => n is { [key: string]: unknown; [key: number]: unknown; }; /** * Check if a value is a function. */ declare const func: (n: unknown) => n is Function; /** * Check if a value is a negative number. */ declare const negative: (n: unknown) => n is number; /** * Get a value from an object or an array. */ declare const get: (from: unknown, path: Path) => unknown; /** * Assign object into another */ declare const assign: (target: T, source: U) => T & U; /** * Merge deeply one object into another. */ declare const merge: (target: T, source: U) => T & U; /** * Warn if a condition is not met. */ declare const warn: (condition: boolean, message: string) => void; /** * Recursively call a function until getting something that is not a function. */ declare function cascade(value: unknown, arg?: unknown): Exclude; /** * Get value from theme. */ declare const getThemeValue: >(props: T, path: Path, initial?: unknown) => unknown; /** * Omit values from an object. */ declare function omit(object: T, values: K): Pick>; /** * Flatten every string together in an array. */ declare function flattenStrings(array: any[]): any[]; /** * Flatten an array. */ declare function flatten(array: any[]): any[]; export { ITheme, Path, Props, assign, cascade, flatten, flattenStrings, func, get, getThemeValue, identity, is, merge, negative, num, obj, omit, string, warn };