My dilemma is that I have a few classes and I am trying to create a function that only accepts the classes themselves, not instances of the classes.
class Page1 {
}
class Page2 {
}
register(Page1);
register(Page2);
function Register(pageType){..}
Can someone help me figure out how to annotate the pageType parameter so that register(new Page1());
will result in an error?
Essentially, I am looking for the equivalent of this method in C#:
void Register(Type pageType){..}