src/language-js/comments.js/handleFunctionNameComments
function handleFunctionNameComments({
  comment,
  precedingNode,
  enclosingNode,
  text,
}) {
  if (getNextNonSpaceNonCommentCharacter(text, comment, locEnd) !== "(") {
    return false;
  }
  if (precedingNode && functionLikeNodeTypes.has(enclosingNode?.type)) {
    addTrailingComment(precedingNode, comment);
    return true;
  }
  return false;
}