To get this package fully type safe PHPStan supports type testing to ensure every type is working as intended. How to do this is described in https://blog.wyrihaximus.net/2024/06/updating-php-packages-to-reactphp-promise-v3--and-test-your-types-with-phpstan/ .
For more reference material I'm doing the same thing in reactphp-parallel/event-loop#51