UNPKG

@shopify/react-form-state

Version:
9 lines (8 loc) 618 B
import isEqual from 'fast-deep-equal'; export { isEqual }; export declare function mapObject<Input, Output>(input: Input, mapper: (value: any, key: keyof Input) => any): Output; export declare function push<T>(array: T[], ...values: T[]): T[]; export declare function remove<T>(array: T[], targetIndex: number): T[]; export declare function replace<T>(array: T[], targetIndex: number, newValue: T): T[]; export declare function set<InputType extends object>(rootObject: InputType, path: string[], value: any): any; export declare function flatMap<T>(array: any[], mapper: (item: any, index?: number) => T | T[]): T[];