src/language-js/print/module.js/printModuleSpecifier
function printModuleSpecifier(path, options, print) {
  const node = path.getNode();

  const { type, importKind } = node;
  /** @type{Doc[]} */
  const parts = [];
  if (type === "ImportSpecifier" && importKind) {
    parts.push(importKind, " ");
  }

  const isImport = type.startsWith("Import");
  const leftSideProperty = isImport ? "imported" : "local";
  const rightSideProperty = isImport ? "local" : "exported";
  let left = "";
  let right = "";
  if (
    type === "ExportNamespaceSpecifier" ||
    type === "ImportNamespaceSpecifier"
  ) {
    left = "*";
  } else if (node[leftSideProperty]) {
    left = path.call(print, leftSideProperty);
  }

  if (
    node[rightSideProperty] &&
    (!node[leftSideProperty] ||
      // import {a as a} from '.'
      !hasSameLoc(node[leftSideProperty], node[rightSideProperty]))
  ) {
    right = path.call(print, rightSideProperty);
  }

  parts.push(left, left && right ? " as " : "", right);
  return concat(parts);
}