import { IRequestOptions , cleanUrl } from "@esri/arcgis-rest-request" ; param requestOptions returns export function getPortalUrl ( requestOptions = { } ) { if ( requestOptions . portal ) { return cleanUrl ( requestOptions . portal ) ; } if ( requestOptions . authentication ) { return requestOptions . authentication . portal ; } return "https://www.arcgis.com/sharing/rest" ; }