function getStringOrObjectValOfExportMapEntry({ valObjOrStr, nodeResolveMode }) {
  if (typeof valObjOrStr !== 'object') {
    return valObjOrStr;
  }
  if (!valObjOrStr?.[nodeResolveMode]) {
    // This is allowed: it makes sense to have an entrypoint on the root for typescript, not for others
    return null;
  }
  return valObjOrStr[nodeResolveMode];
}
@param {{valObjOrStr:object|string|null;nodeResolveMode:string}} opts
@returns {string|null}