function writeFeatureFlags (quasarConf, fsUtils) {
  const { appPaths } = quasarConf.ctx

  const featureFlags = new Set()

  if (quasarConf.metaConf.hasStore === true) {
    featureFlags.add('store')
  }

  // spa does not have a feature flag, so we skip it
  const modes = [ 'pwa', 'ssr', 'cordova', 'capacitor', 'electron', 'bex' ]
  for (const modeName of modes) {
    if (isModeInstalled(appPaths, modeName)) {
      featureFlags.add(modeName)
    }
  }

  const flagDefinitions = Array.from(featureFlags)
    .map(flag => `${ flag }: true;`)
    .join('\n    ')
  const contents = featureFlagsTemplate.replace(
    '__INJECTION_POINT__',
    flagDefinitions || '// no feature flags'
  )

  fsUtils.writeFileSync('feature-flags.d.ts', contents)
}
Flags are also available in JS codebases because feature flags still
benefit JS users by providing autocomplete.

@param {import('../types/configuration/conf').ResolvedQuasarConf} quasarConf