Function omit

  • Omits properties from source value. If source type is nullable or optional, the result type is nullable or optional too.

    There are two signatures of this function, depending on number of properties.

    1. When number of omitted properties <= 15, the result type will be the source value without these properties (strongly typed).
    2. If the number of omitted properties > 15, the result will be the source value with all properties marked as optional.

    Returns

    the source value with omitted properties

    Type Parameters

    • T

    • K extends string | number | symbol

    Parameters

    • source: T

      source value which properties should be omitted

    • keys: K[]

      array of names of the properties

    Returns Without<T, K>

  • Omits properties from source value. If source type is nullable or optional, the result type is nullable or optional too.

    There are two signatures of this function, depending on number of properties.

    1. When number of omitted properties <= 15, the result type will be the source value without these properties (strongly typed).
    2. If the number of omitted properties > 15, the result will be the source value with all properties marked as optional.

    Returns

    the source value with omitted properties

    Type Parameters

    • T

    • K extends string | number | symbol

    Parameters

    • source: Nullable<T>

      source value which properties should be omitted

    • keys: K[]

      array of names of the properties

    Returns Nullable<Without<T, K>>

  • Omits properties from source value. If source type is nullable or optional, the result type is nullable or optional too.

    There are two signatures of this function, depending on number of properties.

    1. When number of omitted properties <= 15, the result type will be the source value without these properties (strongly typed).
    2. If the number of omitted properties > 15, the result will be the source value with all properties marked as optional.

    Returns

    the source value with omitted properties

    Type Parameters

    • T

    • K extends string | number | symbol

    Parameters

    • source: Undefinable<T>

      source value which properties should be omitted

    • keys: K[]

      array of names of the properties

    Returns Undefinable<Without<T, K>>

  • Omits properties from source value. If source type is nullable or optional, the result type is nullable or optional too.

    There are two signatures of this function, depending on number of properties.

    1. When number of omitted properties <= 15, the result type will be the source value without these properties (strongly typed).
    2. If the number of omitted properties > 15, the result will be the source value with all properties marked as optional.

    Returns

    the source value with omitted properties

    Type Parameters

    • T

    • K extends string | number | symbol

    Parameters

    • source: Optional<T>

      source value which properties should be omitted

    • keys: K[]

      array of names of the properties

    Returns Optional<Without<T, K>>

Generated using TypeDoc