function makeLoaderFromUrlLike(url) {
  /**
   * @type {Loader}
   */
  let loader;

  if (Array.isArray(url)) {
    loader = makeLoaderFromTemplates(url);
  } else if (typeof url === 'string') {
    const urls = expandUrl(url);
    loader = makeLoaderFromTemplates(urls);
  } else if (typeof url === 'function') {
    loader = makeLoaderFromGetter(url);
  } else {
    throw new Error(
      'The url option must be a single template, an array of templates, or a function for getting a URL',
    );
  }
  return loader;
}
@param {UrlLike} url The URL-like option.
@return {Loader} The tile loader.