import { GlobalSearchProviderResultUrl } from './types' ; export interface IBasePath { prepend ( path ) : string ; } /**
 * Convert a  GlobalSearchProviderResultUrl to an absolute or relative url
 * usable in  GlobalSearchResult export const convertResultUrl = ( url , basePath ) : string => { if ( typeof url === 'string' ) { if ( url . startsWith ( '/' ) ) { return basePath . prepend ( url ) ; } return url ; } if ( url . prependBasePath ) { return basePath . prepend ( url . path ) ; } return url . path ; } ;