Skip to content

Commit 96ae0fc

Browse files
lauraharkercopybara-github
authored andcommitted
Delete the unused $jscomp.registerEs6ModuleExports from js/es6/modules/runtime.js
The Closure debug loader has a registerEs6ModuleExports method that gets used instead. PiperOrigin-RevId: 725793014
1 parent c86e4dd commit 96ae0fc

File tree

1 file changed

+0
-23
lines changed
  • src/com/google/javascript/jscomp/js/es6/modules

1 file changed

+0
-23
lines changed

src/com/google/javascript/jscomp/js/es6/modules/runtime.js

-23
Original file line numberDiff line numberDiff line change
@@ -479,29 +479,6 @@ $jscomp.registerAndLoadModule = function(
479479
};
480480

481481

482-
/**
483-
* Registers an object as if it is the exports of an ES6 module so that it may
484-
* be retrieved via $jscomp.require.
485-
*
486-
* Used by Closure Library in the event that only some ES6 modules need
487-
* transpilation.
488-
*
489-
* @param {string} absModulePath
490-
* @param {?} exports
491-
*/
492-
$jscomp.registerEs6ModuleExports = function(absModulePath, exports) {
493-
if (moduleCache.has(absModulePath)) {
494-
throw new Error(
495-
'Module at path ' + absModulePath + ' is already registered.');
496-
}
497-
498-
var entry =
499-
new CacheEntry(null, new Module(absModulePath, exports), absModulePath);
500-
moduleCache.set(absModulePath, entry);
501-
markAvailable(absModulePath);
502-
};
503-
504-
505482
/**
506483
* Hook to clear all loaded modules. Meant to only be used by tests.
507484
*/

0 commit comments

Comments
 (0)