deleteIn<T, A>(state: T, path: readonly [A]): Without<T, A>
deleteIn<T, A, B>(state: T, path: readonly [A, B]): Without2<T, A, B>
deleteIn<T, A, B, C>(state: T, path: readonly [A, B, C]): Without3<T, A, B, C>
deleteIn<T, A, B, C, D>(state: T, path: readonly [A, B, C, D]): Without4<T, A, B, C, D>
deleteIn<T, A, B, C, D, E>(state: T, path: readonly [A, B, C, D, E]): Without5<T, A, B, C, D, E>
deleteIn<T, A, B, C, D, E, F>(state: T, path: readonly [A, B, C, D, E, F]): Without6<T, A, B, C, D, E, F>
deleteIn<T, A, B, C, D, E, F, G>(state: T, path: readonly [A, B, C, D, E, F, G]): Without7<T, A, B, C, D, E, F, G>
deleteIn<T, A, B, C, D, E, F, G, H>(state: T, path: readonly [A, B, C, D, E, F, G, H]): Without8<T, A, B, C, D, E, F, G, H>
Uses updateIn and returns updated state with key for given path removed. Does not modify original state. Returns undefined if path is an empty string or array.
remarks
Only the first 8 path levels are type checked. The result type will have the path value removed too.
Uses updateIn and returns updated state with key for given path removed. Does not modify original state. Returns
undefined
ifpath
is an empty string or array.Only the first 8 path levels are type checked. The result type will have the path value removed too.
See deleteInUnsafe for unchecked version.
// type checked deleteIn({ a: { b: { c: 23 } } }, ["a","b","c"]); // error (invalid path) deleteIn({ a: { b: { c: 23 } } }, ["a","b","d"]);