This uses TypeScript's TypeChecker to determine the types and the code is a little cleaner, but still needs a lot of work: - Determine how to figure out class type parameters