UNPKG

react-use-mapped-state

Version:
21 lines (20 loc) 953 B
export declare type MappedStateEntry = Array<[string, any]>; export declare type valueSetter = (reference: string | string[], value: any | any[]) => void; export declare type MappedStateValues = { [key: string]: any; }; export declare type MappedReturnValues = [MappedStateValues, valueSetter]; export declare type MappedStateInnerMap = Map<string, any>; export declare type MappedStateMap = Map<string, MappedStateInnerMap>; export declare type MappedStateMapEntry = [string, MappedStateInnerMap]; export declare type useMappedState = (stateValues: MappedStateEntry) => MappedReturnValues; declare class ProtectedMap { private data; private map; constructor(data: MappedStateEntry); getReturnValues(): MappedReturnValues; convertToMap(data: MappedStateEntry): Map<any, any>; modifyMappedState(keys: string | string[], vals: any | any[]): void; getValue(key: any): any; } export default ProtectedMap;