UNPKG

@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>

25 lines 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCallSignatureChain = getCallSignatureChain; const ts_morph_1 = require("ts-morph"); const for_all_interfaces_1 = require("../interface/for-all-interfaces"); const get_call_signature_name_1 = require("./get-call-signature-name"); /** * * @param callSignature */ function getCallSignatureChain(callSignature) { const parent = callSignature.getParent(); const callSignatures = []; const name = (0, get_call_signature_name_1.getCallSignatureName)(callSignature); if (ts_morph_1.Node.isInterfaceDeclaration(parent)) { (0, for_all_interfaces_1.forAllInterfaces)(parent, (int) => { const callSignature = int.getCallSignature((cs) => (0, get_call_signature_name_1.getCallSignatureName)(cs) === name); if (callSignature) { callSignatures.push(callSignature); } }); } return callSignatures; } //# sourceMappingURL=get-call-signature-chain.js.map