makeMapParsers = ({
  parserForLanguage,
  moduleTransforms,
  syncModuleTransforms,
}) => {
  /**
   * Async `mapParsers()` function; returned when a non-synchronous parser is
   * present _or_ when `moduleTransforms` is non-empty.
   *
   * @type {MapParsersFn<AsyncParseFn>}
   */
  const asyncParseFn = (languageForExtension, languageForModuleSpecifier) =>
    mapParsers(
      languageForExtension,
      languageForModuleSpecifier,
      parserForLanguage,
      moduleTransforms,
      syncModuleTransforms,
    );

  if (moduleTransforms && keys(moduleTransforms).length > 0) {
    return asyncParseFn;
  }

  // all parsers must explicitly be flagged `synchronous` to return a
  // `MapParsersFn<ParseFn>`
  if (values(parserForLanguage).some(({ synchronous }) => !synchronous)) {
    return asyncParseFn;
  }

  /**
   * Synchronous `mapParsers()` function; returned when all parsers are
   * synchronous and `moduleTransforms` is empty.
   *
   * @type {MapParsersFn<ParseFn>}
   */
  return (languageForExtension, languageForModuleSpecifier) =>
    mapParsers(
      languageForExtension,
      languageForModuleSpecifier,
      parserForLanguage,
      moduleTransforms,
      syncModuleTransforms,
      true,
    );
}
Prepares a function to map parsers after verifying whether synchronous
behavior is preferred. Synchronous behavior is selected if all parsers are
synchronous and no async transforms are provided.

_Note:_ The type argument for {@link MapParsersFn} _could_ be inferred from
the function arguments _if_ {@link ParserForLanguage} contained only values
of type `ParserImplementation & {synchronous: true}` (and also considering
the emptiness of `moduleTransforms`); may only be worth the effort if it was
causing issues in practice.

@param {MakeMapParsersOptions} options
@returns {MapParsersFn}