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 ...
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 ..."
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With