src/IteratorPipeline/Traits/TypeHandlingTrait.php
public function typeCast(string $type, ?\Throwable $throwable = null)
    {
        return $this->then(i\iterable_type_cast, $type, $throwable);
    }
public function typeCast(string $type, ?\Throwable $throwable = null)
    {
        return $this->then(i\iterable_type_cast, $type, $throwable);
    }
Cast a value to the specific type or throw an error.

@param string          $type
@param \Throwable|null $throwable
@return static