src/language-js/comments.js/handleTSMappedTypeComments
function handleTSMappedTypeComments({
  comment,
  precedingNode,
  enclosingNode,
  followingNode,
}) {
  if (enclosingNode?.type !== "TSMappedType") {
    return false;
  }

  if (followingNode?.type === "TSTypeParameter" && followingNode.name) {
    addLeadingComment(followingNode.name, comment);
    return true;
  }

  if (precedingNode?.type === "TSTypeParameter" && precedingNode.constraint) {
    addTrailingComment(precedingNode.constraint, comment);
    return true;
  }

  return false;
}