Obtaining the return type of a function
If the function in question is a method of a user defined class, you can use method decorators in conjuction with Reflect Metadata to determine the return type (constructor function) at runtime (and with it, do as you see fit).
https://stackoverflow.com/questions/36015691/obtaining-the-return-type-of-a-function