You can use generic class-string annotations to hint that an instance of the passed class is returned
- ·
- Telegram
- ·
- Newsletter
This is how you can hint that a function returns an instance of the class of which you passed the class name.
Cool stuff!
Hat tip to @enunomaduro