UNPKG

@buurman/sdk

Version:

The buurman SDK

19 lines 770 B
import { Mutation } from "@buurman/commons"; import { JsonApi } from "./JsonApi"; export declare type Value<T> = T | null; export declare const initialValue: Value<any>; export declare const types: { SET: string; TRANSFORM: string; }; export declare const reducer: <T>(value: T | null | undefined, { type, payload }: Mutation<any>) => any; declare const JsonMutator: <T>(getApi: () => JsonApi<T, {}>) => { applyMutations: (initialValue: unknown) => unknown; mutations: { set: (...args: any[]) => JsonApi<T, {}>; transform: (...args: any[]) => JsonApi<T, {}>; setProperty: (property: string | string[], value: any) => JsonApi<T, {}>; }; }; export default JsonMutator; //# sourceMappingURL=JsonMutator.d.ts.map