```python
def chunk_list(items: list, size: int) -> list[list]:
    """
    Splits a list into chunks of a specified size.

    :param items: List to be split.
    :param size: Size of each chunk. Must be greater than zero.
    :return: A list of lists containing the chunks.
    :raises ValueError: If size is less than or equal to zero.
    """
    if size <= 0:
        raise ValueError("Size must be greater than zero.")
    
    return [items[i:i + size] for i in range(0, len(items), size)]
```