Debian Codegraph @

closure-library/closure/goog/module/abstractmoduleloader.js

raw
1 // Copyright 2009 The Closure Library Authors. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS-IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 /**
16 * @fileoverview An interface for module loading.
17 *
18 */
19
20 goog.provide('goog.module.AbstractModuleLoader');
21
22 /** @suppress {extraRequire} */
23 goog.require('goog.module');
24 goog.require('goog.module.ModuleInfo');
25
26
27 /**
28 * An interface that loads JavaScript modules.
29 * @interface
30 */
31 goog.module.AbstractModuleLoader = function() {};
32
33
34 /**
35 * Loads a list of JavaScript modules.
36 *
37 * @param {Array<string>} ids The module ids in dependency order.
38 * @param {!Object<string, !goog.module.ModuleInfo>} moduleInfoMap A mapping
39 * from module id to ModuleInfo object.
40 * @param {function()?=} opt_successFn The callback if module loading is a
41 * success.
42 * @param {function(?number)?=} opt_errorFn The callback if module loading is an
43 * error.
44 * @param {function()?=} opt_timeoutFn The callback if module loading times out.
45 * @param {boolean=} opt_forceReload Whether to bypass cache while loading the
46 * module.
47 */
48 goog.module.AbstractModuleLoader.prototype.loadModules = function(
49 ids, moduleInfoMap, opt_successFn, opt_errorFn, opt_timeoutFn,
50 opt_forceReload) {};
51
52
53 /**
54 * Pre-fetches a JavaScript module.
55 *
56 * @param {string} id The module id.
57 * @param {!goog.module.ModuleInfo} moduleInfo The module info.
58 */
59 goog.module.AbstractModuleLoader.prototype.prefetchModule = function(
60 id, moduleInfo) {};