• Try to convert a string to an int, falling back to undefined if unable to.

    Parameters

    • maybeInt: undefined | string

      String to convert to an int.

    Returns number | undefined

    The int if it was able to convert, otherwise undefined.