Function exist

  • Checks whether path exist in source value.

    Source value can be nullable or undefinable, and path is treated as if the source (and all intermediate) values are required (because nullable and undefinable types can't have keys).

    Path supports up to 5 elements. This means, you are not able to use this helper if you need more.

    Returns

    true if the path exist in source, false otherwise

    Type Parameters

    • T

    • K1 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source value in which the path should be checked.

    • path: [K1]

      path array to be checked

    Returns boolean

  • Checks whether path exist in source value.

    Source value can be nullable or undefinable, and path is treated as if the source (and all intermediate) values are required (because nullable and undefinable types can't have keys).

    Path supports up to 5 elements. This means, you are not able to use this helper if you need more.

    Returns

    true if the path exist in source, false otherwise

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source value in which the path should be checked.

    • path: [K1, K2]

      path array to be checked

    Returns boolean

  • Checks whether path exist in source value.

    Source value can be nullable or undefinable, and path is treated as if the source (and all intermediate) values are required (because nullable and undefinable types can't have keys).

    Path supports up to 5 elements. This means, you are not able to use this helper if you need more.

    Returns

    true if the path exist in source, false otherwise

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    • K3 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source value in which the path should be checked.

    • path: [K1, K2, K3]

      path array to be checked

    Returns boolean

  • Checks whether path exist in source value.

    Source value can be nullable or undefinable, and path is treated as if the source (and all intermediate) values are required (because nullable and undefinable types can't have keys).

    Path supports up to 5 elements. This means, you are not able to use this helper if you need more.

    Returns

    true if the path exist in source, false otherwise

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    • K3 extends string | number | symbol

    • K4 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source value in which the path should be checked.

    • path: [K1, K2, K3, K4]

      path array to be checked

    Returns boolean

  • Checks whether path exist in source value.

    Source value can be nullable or undefinable, and path is treated as if the source (and all intermediate) values are required (because nullable and undefinable types can't have keys).

    Path supports up to 5 elements. This means, you are not able to use this helper if you need more.

    Returns

    true if the path exist in source, false otherwise

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    • K3 extends string | number | symbol

    • K4 extends string | number | symbol

    • K5 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source value in which the path should be checked.

    • path: [K1, K2, K3, K4, K5]

      path array to be checked

    Returns boolean

Generated using TypeDoc