Real type hint for ObjectRef

How can I add proper type hint for ObjectRef, so my IDE could properly check function input (that it is actually an ObjectRef) and find the referenced class in usage?

cc @simon-mo I remember you added the type hint to the object reference. Can you recommend him how to do that?