code: function matchPatternOrExact(patternStrings, candidate) {
          var patterns = [];
          for (var _i = 0, patternStrings_1 = patternStrings; _i < patternStrings_1.length; _i++) {
              var patternString = patternStrings_1[_i];
              var pattern = tryParsePattern(patternString);
              if (pattern) {
                  patterns.push(pattern);
              }
              else if (patternString === candidate) {
                  // pattern was matched as is - no need to search further
                  return patternString;
              }
          }
          return findBestPatternMatch(patterns, function (_) { return _; }, candidate);
      }
docs: patternStrings contains both pattern strings (containing "*") and regular strings.
  Return an exact match if possible, or a pattern match, or undefined.
  (These are verified by verifyCompilerOptions to have 0 or 1 "*" characters.)