If I have this:
export class JobFields implements EntityFields {}
(it could also extends from EntityFields if it helps)
can I have my method accepting only references for classes that implements/extends EntityFields
? Like:
private test(entity: EntityFields) {} //this does not work, it accept anything
I'm creating components that automatically reads from classes that contains information regarding back-end entities. I just want to force/induce the Developper to give it the right kind of class reference.
this.test(JobFields); //this should work
this.test(JobView); //while this shouldn't