You should be able to type hint this and not have any issues.

```php
/**
 * Set an output object.
 *
 * @param   CliOutput  $output  CliOutput object
 *
 * @return  JApplicationCli  Instance of $this to allow chaining.
 *
 * @since   3.3
 */
public function setOutput(CliOutput $output)
{
    $this->output = $output;

    return $this;
}
```