// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp

import _ = require("../index");

interface UpdateWith {
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (): UpdateWith;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    <T extends object>(customizer: _.SetWithCustomizer<T>): UpdateWith1x1<T>;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    <T extends object>(customizer: _.SetWithCustomizer<T>, path: _.PropertyPath): UpdateWith1x2<T>;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    <T extends object>(customizer: _.SetWithCustomizer<T>, path: _.PropertyPath, updater: (oldValue: any) => any): UpdateWith1x3<T>;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    <T extends object>(customizer: _.SetWithCustomizer<T>, path: _.PropertyPath, updater: (oldValue: any) => any, object: T): T;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    <T extends object, TResult>(customizer: _.SetWithCustomizer<T>, path: _.PropertyPath, updater: (oldValue: any) => any, object: T): TResult;
}
interface UpdateWith1x1<T extends object> {
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (): UpdateWith1x1<T>;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (path: _.PropertyPath): UpdateWith1x2<T>;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (path: _.PropertyPath, updater: (oldValue: any) => any): UpdateWith1x3<T>;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (path: _.PropertyPath, updater: (oldValue: any) => any, object: T): T;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    <TResult>(path: _.PropertyPath, updater: (oldValue: any) => any, object: T): TResult;
}
interface UpdateWith1x2<T extends object> {
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (): UpdateWith1x2<T>;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (updater: (oldValue: any) => any): UpdateWith1x3<T>;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (updater: (oldValue: any) => any, object: T): T;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    <TResult>(updater: (oldValue: any) => any, object: T): TResult;
}
interface UpdateWith1x3<T extends object> {
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (): UpdateWith1x3<T>;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    (object: T): T;
    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @since 4.6.0
     * @category Object
     * @param object The object to modify.
     * @param path The path of the property to set.
     * @param updater The function to produce the updated value.
     * @param [customizer] The function to customize assigned values.
     * @returns Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    <TResult>(object: T): TResult;
}

declare const updateWith: UpdateWith;
export = updateWith;
