Use the concrete return type
Since there is no API boundary here, using an interface doesn't give us any
additional flexibility, it just obfuscates.
GITHUB_BREAKING_CHANGES=none
@@ -23357,6 +23357,39 @@ goog.soy.data.SanitizedCss.prototype.toSafeStyleSheet = function() {
value);
};
+//javascript/template/soy/legacy_object_map_to_map.js
+goog.loadModule(function(exports) {'use strict';/**
+ * @fileoverview Map-related functions that can't live in soyutils_map.js
+ * due to b/72879961.
+ */
+goog.module('soy.$$legacyObjectMapToMap');
+goog.module.declareLegacyNamespace();
+
+/**
+ * Converts a legacy object map with string keys into an equivalent SoyMap.
+ * @param {!Object<V>} obj
+ * @return {!Map<string, V>}
+ * @template V
+ */
+function $$legacyObjectMapToMap(obj) {
+ // TODO(b/72879961): the Map instantiation causes JSCompiler to be more
+ // conservative in dead code elimination. The result is a uniform 100-200 byte
+ // increase in the transitive size of every module, even if no Soy template
+ // uses legacyObjectMapToMap(). As a workaround, put this function in its own
+ // file so that it is DCE'd by AJD instead of JSCompiler.
+ const map = new Map();
+ for (const key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ map.set(key, obj[key]);
+ }
+ }
+ return map;
+}
+
+exports = $$legacyObjectMapToMap;
+
+;return exports;});
+
//javascript/template/soy/soyutils_map.js
goog.loadModule(function(exports) {'use strict';/*
* Copyright 2017 Google Inc.
@@ -23507,41 +23540,6 @@ exports = {
;return exports;});
-//javascript/template/soy/legacy_object_map_to_map.js
-goog.loadModule(function(exports) {'use strict';/**
- * @fileoverview Map-related functions that can't live in soyutils_map.js
- * due to b/72879961.
- */
-goog.module('soy.$$legacyObjectMapToMap');
-goog.module.declareLegacyNamespace();
-
-const {Map: SoyMap} = goog.require('soy.map');
-
-/**
- * Converts a legacy object map with string keys into an equivalent SoyMap.
- * @param {!Object<V>} obj
- * @return {!SoyMap<string, V>}
- * @template V
- */
-function $$legacyObjectMapToMap(obj) {
- // TODO(b/72879961): the Map instantiation causes JSCompiler to be more
- // conservative in dead code elimination. The result is a uniform 100-200 byte
- // increase in the transitive size of every module, even if no Soy template
- // uses legacyObjectMapToMap(). As a workaround, put this function in its own
- // file so that it is DCE'd by AJD instead of JSCompiler.
- const map = new Map();
- for (const key in obj) {
- if (obj.hasOwnProperty(key)) {
- map.set(key, obj[key]);
- }
- }
- return map;
-}
-
-exports = $$legacyObjectMapToMap;
-
-;return exports;});
-
//javascript/template/soy/soyutils_usegoog.js
/*
* Copyright 2008 Google Inc.
