code: function set(target, path, value) {
      if (path.length === 0) {
          return value;
      }
      return assign(Array.isArray(target) ? [] : {}, target, (_a = {},
          _a[path[0]] = path.length > 1 ? set(target[path[0]] || {}, path.slice(1), value) : value,
          _a));
      var _a;
  }
docs: Immutable set: set the value at the given path in the given target and returns a new target.
  Creates the necessary objects/arrays if the path doesn't exist.