Reputation: 882
I working with TypeScript
Compiler API on small plugin,
and I am curious how to get from NodeObject
all interfaces or classes which it extends ?
I have not found useful example in TypeScript
Compiler API documentation ...
Any help will be appreciated ...
Upvotes: 3
Views: 380
Reputation: 882
I have found answer,
It is possible to do using heritageClauses
:
if (node.heritageClauses) {
for(const hc of node.heritageClauses) {
console.log("heritage clause: " + hc.getText()); // prints "extends ..."
}
}
Upvotes: 1