Options
All
  • Public
  • Public/Protected
  • All
Menu

Module omit

Index

Functions Object

Object Functions

  • omit<T>(object: T, ...paths: ArrayPath[]): Partial<T>
  • The opposite of pick;

    this method creates an object composed of the own and inherited enumerable property paths of object that are not omitted.

    since

    5.18.0

    example
    const object = { 'a': 1, 'b': '2', 'c': 3 };
    omit(object, ['a', 'c']);
    // => { 'b': '2' }

    Type Parameters

    • T extends unknown

    Parameters

    • object: T
    • Rest ...paths: ArrayPath[]

    Returns Partial<T>