import type { DeepPath, Path, Path0, Path1, Path2, Path3, Path4, Path5, Path6, Path7, Path8, PathVal } from "@thi.ng/api"; /** * Non-typechecked version of {@link setIn}. * * @remarks * The type parameter `T` can be used to indicate the type of the nested value * to be set (default: `any`). * * @example * ```ts tangle:../export/set-in-unsafe.ts * import { setInUnsafe } from "@thi.ng/paths"; * * console.log( * setInUnsafe({}, "a.b.c", 23) * ); * // { a: { b: { c: 23} } } * ``` * * @param state - * @param path - */ export declare const setInUnsafe: (state: any, path: Path, val: T) => any; /** * Type checked, immediate use setter, i.e. same as: * `defSetterUnsafe(path)(state, val)`. * * @remarks * Only the first 8 path levels are type checked. * * @example * ```ts tangle:../export/set-in.ts * import { setIn } from "@thi.ng/paths"; * * // type checked path & value * console.log( * setIn({ a: { b: { c: 23 } } }, ["a", "b", "c"], 24) * ); * // { a: { b: { c: 24 } } } * * // type error (wrong value type for given path) * console.log( * setIn({ a: { b: { c: 23 } } }, ["a", "b", "c"], "24") * ); * ``` * * @param state - * @param path - * @param val - */ export declare function setIn(state: T, path: Path0, val: T): T; export declare function setIn(state: T, path: Path1, val: PathVal): T; export declare function setIn(state: T, path: Path2, val: PathVal): T; export declare function setIn(state: T, path: Path3, val: PathVal): T; export declare function setIn(state: T, path: Path4, val: PathVal): T; export declare function setIn(state: T, path: Path5, val: PathVal): T; export declare function setIn(state: T, path: Path6, val: PathVal): T; export declare function setIn(state: T, path: Path7, val: PathVal): T; export declare function setIn(state: T, path: Path8, val: PathVal): T; export declare function setIn(state: T, path: DeepPath, val: any): any; //# sourceMappingURL=set-in.d.ts.map