Function tryConvert

  • Tries to convert a value to a given type.

    Type Parameters

    Parameters

    Returns undefined | SpecTypes[T]

    The converted value, or undefined if the conversion failed.

    Note: We can convert most values to strings, and strings to most other types. Apart from that, we return undefined as we don’t want to make any assumptions.

Generated using TypeDoc