import type { DeepPath, Path, Path0, Path1, Path2, Path3, Path4, Path5, Path6, Path7, Path8, PathVal } from "@thi.ng/api"; /** * Non-typechecked version of {@link mutIn}. * * @remarks * The type parameter `T` can be used to indicate the type of the nested * value to be mutated (default: `any`). * * Also see {@link defMutatorUnsafe}. * * @example * ```ts tangle:../export/mut-in-unsafe.ts * import { mutInUnsafe } from "@thi.ng/paths"; * * console.log( * mutInUnsafe({ a: { b: [10, 20] } }, "a.b.1", 23) * ); * // { a: { b: [ 10, 23 ] } } * * // fails (see `defMutator()` docs) * console.log( * mutInUnsafe({}, "a.b.c", 23) * ); * // undefined * ``` * * @param state - * @param path - * @param val - */ export declare const mutInUnsafe: (state: any, path: Path, val: T) => any; /** * Type checked, immediate use mutator, i.e. same as: * `defMutator(path)(state, val)`. * * @remarks * Only the first 8 path levels are type checked. * * Also see {@link defMutator}, {@link mutInUnsafe} * * @example * ```ts tangle:../export/mut-in.ts * import { mutIn } from "@thi.ng/paths"; * * console.log( * mutIn({ a: { b: [10, 20] } }, ["a", "b", 1], 23) * ); * // { a: { b: [ 10, 23 ] } } * ``` * * @param state - * @param path - * @param val - */ export declare function mutIn(state: T, path: Path0, val: T): T; export declare function mutIn(state: T, path: Path1, val: PathVal): T; export declare function mutIn(state: T, path: Path2, val: PathVal): T; export declare function mutIn(state: T, path: Path3, val: PathVal): T; export declare function mutIn(state: T, path: Path4, val: PathVal): T; export declare function mutIn(state: T, path: Path5, val: PathVal): T; export declare function mutIn(state: T, path: Path6, val: PathVal): T; export declare function mutIn(state: T, path: Path7, val: PathVal): T; export declare function mutIn(state: T, path: Path8, val: PathVal): T; export declare function mutIn(state: T, path: DeepPath, val: any): any; //# sourceMappingURL=mut-in.d.ts.map