How can I provide return type hinting from a function parameter?
function buildInstance(target: typeof BaseClass): T { return new tar