function missingScopes() {
    /** @type {Set<string>} */
    const available = new Set()
    /** @type {Set<string>} */
    const needed = new Set()

    for (const [scopeName, grammar] of registered) {
      available.add(scopeName)
      if (grammar.dependencies) {
        for (const dep of grammar.dependencies) {
          needed.add(dep)
        }
      }
    }

    return [...needed]
      .filter(function (d) {
        return !available.has(d)
      })
      .sort()
  }
List scopes that are needed by the registered grammars but that are
missing.

To illustrate, the `text.xml.svg` grammar needs the `text.xml` grammar.
When you register `text.xml.svg` without `text.xml`, it will be listed
here.

@returns {ReadonlyArray<string>}
  List of grammar scopes, such as `'text.md'`.
@example
  ```js
  import {createStarryNight} from '@wooorm/starry-night'
  import textXml from '@wooorm/starry-night/text.xml'
  import textXmlSvg from '@wooorm/starry-night/text.xml.svg'

  const svg = await createStarryNight([textXmlSvg])
  console.log(svg.missingScopes()) //=> ['text.xml']

  const svgAndXml = await createStarryNight([textXmlSvg, textXml])
  console.log(svgAndXml.missingScopes()) //=> []
  ```