function readConfig() {
  const selector = '.js-config';
  const configEl = document.querySelector(selector);

  if (!configEl) {
    throw new Error(`No config object found for selector "${selector}"`);
  }

  try {
    const config = JSON.parse(/** @type {string} */ (configEl.textContent));
    return config;
  } catch (err) {
    throw new Error('Failed to parse frontend configuration');
  }
}
/**
 * Read frontend app configuration from a JSON `<script>` tag in the page
 * matching the selector ".js-config".
 *
 * @return {ConfigObject}
 */
Read frontend app configuration from a JSON `


Read frontend app configuration from a JSON `
function readConfig() {
  const selector = '.js-config';
  const configEl = document.querySelector(selector);
  if (!configEl) {
    throw new Error(`No config object found for selector "${selector}"`);
  }
  try {
    const config = JSON.parse( (configEl.textContent));
    return config;
  } catch (err) {
    throw new Error('Failed to parse frontend configuration');
  }
}
function readConfig ( ) { const selector = '.js-config' ; const configEl = document . querySelector ( selector ) ; if ( ! configEl ) { throw new Error ( ` ${ selector } ` ) ; } try { const config = JSON . parse ( ( configEl . textContent ) ) ; return config ; } catch ( err ) { throw new Error ( 'Failed to parse frontend configuration' ) ; } }
Read frontend app configuration from a JSON `<script>` tag in the page
 matching the selector ".js-config".
Read frontend app configuration from a JSON ` <script > ` tag in the page matching the selector " . js - config " .
/** @type {string} */