Options
All
  • Public
  • Public/Protected
  • All
Menu

Module object/omit

Index

References

Interfaces

Type aliases

Functions

References

Renames and re-exports omit

Type aliases

Omitted<T, K>: Pick<T, Exclude<keyof T, K>>

Type parameters

Functions

  • omit<K, O>(props: readonly K[], obj: O): Omitted<O, K>
  • omit<K>(props: readonly K[]): <O>(obj: O) => Omitted<O, K>
  • Returns a partial copy of an object omitting the keys specified.

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

    Type parameters

    • K: string | number | symbol

    • O

    Parameters

    • props: readonly K[]

      an array of String property names to omit from the new object

    • obj: O

      The object to copy from

    Returns Omitted<O, K>

    A new object with properties from names not on it.

  • Returns a partial copy of an object omitting the keys specified.

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

    Type parameters

    • K: string | number | symbol

    Parameters

    • props: readonly K[]

      an array of String property names to omit from the new object

    Returns <O>(obj: O) => Omitted<O, K>

    A new object with properties from names not on it.

      • Type parameters

        • O

        Parameters

        • obj: O

        Returns Omitted<O, K>

Generated using TypeDoc