How do i pass a class type into a function

While I’m a little sceptical of your design, you might want to look at Class.isInstance(…) instead of instanceof.

1 Like