Function get

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    Type Parameters

    • T

    • K1 extends string | number | symbol

    Parameters

    • source: T

      source, from which the nested value should be retrieved.

    • path: [K1]

      path array of the nested value in the source

    Returns T[K1]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    Parameters

    • source: T

      source, from which the nested value should be retrieved.

    • path: [K1, K2]

      path array of the nested value in the source

    Returns T[K1][K2]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    • K3 extends string | number | symbol

    Parameters

    • source: T

      source, from which the nested value should be retrieved.

    • path: [K1, K2, K3]

      path array of the nested value in the source

    Returns T[K1][K2][K3]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    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: T

      source, from which the nested value should be retrieved.

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

      path array of the nested value in the source

    Returns T[K1][K2][K3][K4]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    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: T

      source, from which the nested value should be retrieved.

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

      path array of the nested value in the source

    Returns T[K1][K2][K3][K4][K5]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    Type Parameters

    • T

    • K1 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source, from which the nested value should be retrieved.

    • path: [K1]

      path array of the nested value in the source

    Returns undefined | T[K1]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source, from which the nested value should be retrieved.

    • path: [K1, K2]

      path array of the nested value in the source

    Returns undefined | Exclude<T[K1], undefined | null>[K2]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    • K3 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source, from which the nested value should be retrieved.

    • path: [K1, K2, K3]

      path array of the nested value in the source

    Returns undefined | Exclude<Exclude<T[K1], undefined | null>[K2], undefined | null>[K3]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    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, from which the nested value should be retrieved.

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

      path array of the nested value in the source

    Returns undefined | Exclude<Exclude<Exclude<T[K1], undefined | null>[K2], undefined | null>[K3], undefined | null>[K4]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    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, from which the nested value should be retrieved.

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

      path array of the nested value in the source

    Returns undefined | Exclude<Exclude<Exclude<Exclude<T[K1], undefined | null>[K2], undefined | null>[K3], undefined | null>[K4], undefined | null>[K5]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    Type Parameters

    • T

    • K1 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source, from which the nested value should be retrieved.

    • path: [K1]

      path array of the nested value in the source

    • defaultValue: T[K1]

    Returns T[K1]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source, from which the nested value should be retrieved.

    • path: [K1, K2]

      path array of the nested value in the source

    • defaultValue: Exclude<T[K1], undefined | null>[K2]

    Returns Exclude<T[K1], undefined | null>[K2]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    Type Parameters

    • T

    • K1 extends string | number | symbol

    • K2 extends string | number | symbol

    • K3 extends string | number | symbol

    Parameters

    • source: Optional<T>

      source, from which the nested value should be retrieved.

    • path: [K1, K2, K3]

      path array of the nested value in the source

    • defaultValue: Exclude<Exclude<T[K1], undefined | null>[K2], undefined | null>[K3]

    Returns Exclude<Exclude<T[K1], undefined | null>[K2], undefined | null>[K3]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    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, from which the nested value should be retrieved.

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

      path array of the nested value in the source

    • defaultValue: Exclude<Exclude<Exclude<T[K1], undefined | null>[K2], undefined | null>[K3], undefined | null>[K4]

    Returns Exclude<Exclude<Exclude<T[K1], undefined | null>[K2], undefined | null>[K3], undefined | null>[K4]

  • Returns the nested value in source specified by path. There are 3 ways how to use this helper.

    1. If the source value and all intermediate nested values in the path are required, the return value is is also required.

    2. If type of any intermediate value can be nullable or undefined, the result type can be the type on the path or undefined (returned if the intermediate value is undefined at runtime).

    3. You can specify a default value with the same type as the type of the nested value. This value will be returned if any intermediate value in the source is undefined or null.

    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

    the nested value in the source. Value returned is the reference of the value in source. Modifying this value will also modify the source value.

    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, from which the nested value should be retrieved.

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

      path array of the nested value in the source

    • defaultValue: Exclude<Exclude<Exclude<Exclude<T[K1], undefined | null>[K2], undefined | null>[K3], undefined | null>[K4], undefined | null>[K5]

    Returns Exclude<Exclude<Exclude<Exclude<T[K1], undefined | null>[K2], undefined | null>[K3], undefined | null>[K4], undefined | null>[K5]

Generated using TypeDoc