react-elegant-ui
Version:
Elegant UI components, made by BEM best practices for react
26 lines (25 loc) • 1.07 kB
TypeScript
import { CompositeUnit, ConfigurableHOC, HOCOptions } from './types';
/**
* Check object props to match of pattern
*/
export declare const isMatchProps: <T>(props: T, pattern: Partial<T>) => boolean;
/**
* Check HOC requirements to match of current props
*/
export declare const isMatchHOCProps: <T>(props: T, requirements: Partial<T> | undefined) => boolean;
/**
* Check object structure to match with `ConfigurableHOC`
*/
export declare const isHOCObject: <T extends {} = any>(object: CompositeUnit<T>) => object is ConfigurableHOC<T, {}>;
/**
* Get array of props from `HOCOptions`
*/
export declare const getPropsFromHOCOptions: <T extends {}>(options: HOCOptions<T>, onlyPrivate?: boolean) => string[];
/**
* Collect a private props from compose units
*/
export declare const getPrivatePropsFromComposeUnits: <T extends {} = any>(wrappers: CompositeUnit<T>[]) => Record<string, number>;
/**
* Convert object to string who look as `(key1:value1),(key2:value2)`
*/
export declare const getObjectHash: (obj: Record<string, any> | undefined) => string;