docs: function compareSignaturesIdentical(source, target, partialMatch, ignoreThisTypes, ignoreReturnTypes, compareTypes) {
              // TODO (drosen): De-duplicate code between related functions.
              if (source === target) {
                  return -1 /* True */;
              }
              if (!(isMatchingSignature(source, target, partialMatch))) {
                  return 0 /* False */;
              }
              // Check that the two signatures have the same number of type parameters. We might consider
              // also checking that any type parameter constraints match, but that would require instantiating
              // the constraints with a common set of type arguments to get relatable entities in places where
              // type parameters occur in the constraints. The complexity of doing that doesn't seem worthwhile,
              // particularly as we're comparing erased versions of the signatures below.
              if ((source.typeParameters ? source.typeParameters.length : 0) !== (target.typeParameters ? target.typeParameters.length : 0)) {
                  return 0 /* False */;
              }
              // Spec 1.0 Section 3.8.3 & 3.8.4:
              // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N
              source = getErasedSignature(source);
              target = getErasedSignature(target);
              var result = -1 /* True */;
              if (!ignoreThisTypes) {
                  var sourceThisType = getThisTypeOfSignature(source);
                  if (sourceThisType) {
                      var targetThisType = getThisTypeOfSignature(target);
                      if (targetThisType) {
                          var related = compareTypes(sourceThisType, targetThisType);
                          if (!related) {
                              return 0 /* False */;
                          }
                          result &= related;
                      }
                  }
              }
              var targetLen = target.parameters.length;
              for (var i = 0; i < targetLen; i++) {
                  var s = isRestParameterIndex(source, i) ? getRestTypeOfSignature(source) : getTypeOfParameter(source.parameters[i]);
                  var t = isRestParameterIndex(target, i) ? getRestTypeOfSignature(target) : getTypeOfParameter(target.parameters[i]);
                  var related = compareTypes(s, t);
                  if (!related) {
                      return 0 /* False */;
                  }
                  result &= related;
              }
              if (!ignoreReturnTypes) {
                  result &= compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target));
              }
              return result;
          }