code: function matchedText(pattern, candidate) {
          ts.Debug.assert(isPatternMatch(pattern, candidate));
          return candidate.substr(pattern.prefix.length, candidate.length - pattern.suffix.length);
      }
docs: Given that candidate matches pattern, returns the text matching the '*'.
  E.g.: matchedText(tryParsePattern("foo*baz"), "foobarbaz") === "bar"