code: function getResolvedSignature(node, candidatesOutArray) {
              var links = getNodeLinks(node);
              // If getResolvedSignature has already been called, we will have cached the resolvedSignature.
              // However, it is possible that either candidatesOutArray was not passed in the first time,
              // or that a different candidatesOutArray was passed in. Therefore, we need to redo the work
              // to correctly fill the candidatesOutArray.
              var cached = links.resolvedSignature;
              if (cached && cached !== resolvingSignature && !candidatesOutArray) {
                  return cached;
              }
              links.resolvedSignature = resolvingSignature;
              var result = resolveSignature(node, candidatesOutArray);
              // If signature resolution originated in control flow type analysis (for example to compute the
              // assigned type in a flow assignment) we don't cache the result as it may be based on temporary
              // types from the control flow analysis.
              links.resolvedSignature = flowLoopStart === flowLoopCount ? result : cached;
              return result;
          }
docs: candidatesOutArray is passed by signature help in the language service, and collectCandidates must fill it up with the appropriate candidate signatures