@ng-doc/builder
Version:
<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>
20 lines • 608 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.forAllInterfaces = forAllInterfaces;
const ts_morph_1 = require("ts-morph");
/**
*
* @param int
* @param fn
*/
function forAllInterfaces(int, fn) {
const baseInterface = int;
if (!fn(baseInterface)) {
baseInterface
.getExtends()
.map((expr) => expr.getType().getSymbol()?.getDeclarations()[0])
.reverse()
.forEach((node) => ts_morph_1.Node.isInterfaceDeclaration(node) && forAllInterfaces(node, fn));
}
}
//# sourceMappingURL=for-all-interfaces.js.map
;