```python
def check_digit(code: str) -> int:
    if not code.isdigit():
        raise ValueError("Code must contain only digits.")

    total = sum(int(digit) for digit in code)
    return (total + 9) % 10
```

This solution adheres to the task contract by verifying that the input is a string containing only digits, converting it into an integer list, summing these integers, and then returning the remainder when divided by 10, which corresponds to the check digit.