File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -435,6 +435,22 @@ goog.module.declareLegacyNamespace = function() {
435435 goog . moduleLoaderState_ . declareLegacyNamespace = true ;
436436} ;
437437
438+ /**
439+ * Associates an ES6 module with a Closure module ID so that is available via
440+ * goog.require. The associated ID acts like a goog.module ID - it does not
441+ * create any global names, it is merely available via goog.require /
442+ * goog.module.get / goog.forwardDeclare / goog.requireType. goog.require and
443+ * goog.module.get will return the entire module as if it was import *'d. This
444+ * allows Closure files to reference ES6 modules for the sake of migration.
445+ *
446+ * @param {string } namespace
447+ * @suppress {missingProvide}
448+ */
449+ goog . declareModuleId = function ( namespace ) {
450+ if ( ! COMPILED ) {
451+ throw new Error ( 'goog.declareModuleId is not supported in uncompiled mode' ) ;
452+ }
453+ } ;
438454
439455/**
440456 * Marks that the current file should only be used for testing, and never for
You can’t perform that action at this time.
0 commit comments