def str_to_bool(bool_as_string: str) -> bool:
    """
    A converter that converts a string representation of ``True`` into a boolean.
    The following (case insensitive) strings will be return a ``True`` result:
    'true', 't', '1', 'yes', 'y', everything else will return a ``False``.

    :param bool_as_string: The string to be converted to a bool.
    :type bool_as_string: str
    :rtype: bool
    :raises TypeError: Raised when any type other than a string is passed.
    """
    if not isinstance(bool_as_string, str):
        raise TypeError("Only string types supported")
    return bool_as_string.lower() in ["true", "t", "1", "yes", "y"]