docs: function cacheMatchingDirectivesForNode(tNode, tView, localRefs) {
      // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in tsickle.
      var exportsMap = localRefs ? { '': -1 } : null;
      var matches = tView.currentMatches = findDirectiveMatches(tNode);
      if (matches) {
          for (var i = 0; i < matches.length; i += 2) {
              var def = matches[i];
              var valueIndex = i + 1;
              resolveDirective(def, valueIndex, matches, tView);
              saveNameToExportMap(matches[valueIndex], def, exportsMap);
          }
      }
      if (exportsMap)
          cacheMatchingLocalNames(tNode, localRefs, exportsMap);
  }