<?php
use Amp\Parallel\Worker\Task;
use function Amp\Parallel\Worker\submit;
/**
* @implements Task<string, string, string>
*/
class TestTask implements Task
{
/**
* @inheritDoc
*/
public function run(Amp\Sync\Channel $channel, Amp\Cancellation $cancellation): mixed {
}
}
submit(new TestTask())->; // not suggest anything
$channel = submit(new TestTask())->getChannel(); // no hover in getChannel(), but $channel assign type is correctly
Reproduce with
amphp/parallel