lundi 1 août 2016

TypeScript / JavaScript - How to get superclass of a class?

Let's say I have:

class Foo {}
class Bar extends Foo {}
var obj = new Bar();

I figured out that to get Bar there's obj.prototype.constructor.

How can I find out what is the parent class of Bar?





Aucun commentaire:

Enregistrer un commentaire