<commit_before>// Copyright 2009 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview An interface for module loading.
 */

goog.module('goog.module.AbstractModuleLoader');
goog.module.declareLegacyNamespace();

const {ModuleInfo} = goog.require('goog.module');

/**
 * Optional parameters for the loadModules method.
 * @record
 */
class LoadOptions {
  constructor() {
    /**
     * Whether to bypass cache while loading the module.
     * @const {boolean|undefined}
     */
    this.forceReload;

    /**
     * The callback if module loading is an error.
     * @const {(function(?number): void)|undefined}
     */
    this.onError;

    /**
     * The callback if module loading is a success.
     * @const {(function(): void)|undefined}
     */
    this.onSuccess;

    /**
     * The callback if module loading times out.
     * @const {(function(): void)|undefined}
     */
    this.onTimeout;
  }
}

/**
 * An interface that loads JavaScript modules.
 * @interface
 */
class AbstractModuleLoader {
  /**
   * Loads a list of JavaScript modules.
   *
   * @param {!Array<string>} ids The module ids in dependency order.
   * @param {!Object<string, !ModuleInfo>} moduleInfoMap A mapping
   *     from module id to ModuleInfo object.
   * @param {!LoadOptions=} loadOptions
   */
  loadModules(ids, moduleInfoMap, loadOptions) {};


  /**
   * Pre-fetches a JavaScript module.
   *
   * @param {string} id The module id.
   * @param {!ModuleInfo} moduleInfo The module info.
   */
  prefetchModule(id, moduleInfo) {};
}

exports = AbstractModuleLoader;
<commit_msg>Add optional parameter extraEdges to AbstractModuleLoader.loadModules<commit_after>// Copyright 2009 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview An interface for module loading.
 */

goog.module('goog.module.AbstractModuleLoader');
goog.module.declareLegacyNamespace();

const {ModuleInfo} = goog.require('goog.module');

/**
 * Optional parameters for the loadModules method.
 * @record
 */
class LoadOptions {
  constructor() {
    /**
     * A map of extra runtime module dependencies.
     * @type {!Map<string, !Array<string>>|undefined}
     */
    this.extraEdges;

    /**
     * Whether to bypass cache while loading the module.
     * @const {boolean|undefined}
     */
    this.forceReload;

    /**
     * The callback if module loading is an error.
     * @const {(function(?number): void)|undefined}
     */
    this.onError;

    /**
     * The callback if module loading is a success.
     * @const {(function(): void)|undefined}
     */
    this.onSuccess;

    /**
     * The callback if module loading times out.
     * @const {(function(): void)|undefined}
     */
    this.onTimeout;
  }
}

/**
 * An interface that loads JavaScript modules.
 * @interface
 */
class AbstractModuleLoader {
  constructor() {
    /**
     * Whether or not the implementation supports extra edges.
     * @type {boolean|undefined}
     */
    this.supportsExtraEdges;
  }

  /**
   * Loads a list of JavaScript modules.
   *
   * @param {!Array<string>} ids The module ids in dependency order.
   * @param {!Object<string, !ModuleInfo>} moduleInfoMap A mapping
   *     from module id to ModuleInfo object.
   * @param {!LoadOptions=} loadOptions
   */
  loadModules(ids, moduleInfoMap, loadOptions) {};


  /**
   * Pre-fetches a JavaScript module.
   *
   * @param {string} id The module id.
   * @param {!ModuleInfo} moduleInfo The module info.
   */
  prefetchModule(id, moduleInfo) {};
}

exports = AbstractModuleLoader;

{'fraction_non_alphanumeric': 0.11704180064308682, 'fraction_numerical': 0.0034297963558413717, 'mean_word_length': 3.0154905335628226, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '402425', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1283, 'n_words': 460}