• Returns new object with copied all properties without these specified.

    Example

    omit({ name: "Jack", age: 69 }, ["age", "title"]);
    // { name: "Jack" }

    Example

    omit(["hello", "world"], [0]);
    // { 1: "world" }

    Returns

    • new object without given properties

    Type Parameters

    • T extends object

    • K extends string | number | symbol

    Parameters

    • object: null | T

      source object

    • props: K[]

      properties to skip

    Returns T extends null ? { [key: string]: never } : Omit<T, K>

Generated using TypeDoc