// Copyright 2018 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview ES6 module that exports symbols from base.js so that ES616* modules do not need to use globals and so that is clear if a project is using17* Closure's base.js file. It is also a subset of properties in base.js, meaning18* it should be clearer what should not be used in ES6 modules19* (goog.module/provide are not exported here, for example). Though that is not20* to say that everything in this file should be used in an ES6 module; some21* depreciated functions are exported to make migration easier (e.g.22* goog.scope).23*24* Note that this does not load Closure's base.js file, it is still up to the25* programmer to include it. Nor does the fact that this is an ES6 module mean26* that projects no longer require deps.js files for debug loading - they do.27* Closure will need to load your ES6 modules for you if you have any Closure28* file (goog.provide/goog.module) dependencies, as they need to be available29* before the ES6 module evaluates.30*31* Also note that this file has special compiler handling! It is okay to export32* anything from this file, but the name also needs to exist on the global goog.33* This special compiler pass enforces that you always import this file as34* `import * as goog`, as many tools use regex based parsing to find35* goog.require calls.36*/3738export const global = goog.global;39export const require = goog.require;40export const define = goog.define;41export const DEBUG = goog.DEBUG;42export const LOCALE = goog.LOCALE;43export const TRUSTED_SITE = goog.TRUSTED_SITE;44export const DISALLOW_TEST_ONLY_CODE = goog.DISALLOW_TEST_ONLY_CODE;45export const getGoogModule = goog.module.get;46export const setTestOnly = goog.setTestOnly;47export const forwardDeclare = goog.forwardDeclare;48export const getObjectByName = goog.getObjectByName;49export const basePath = goog.basePath;50export const addSingletonGetter = goog.addSingletonGetter;51export const typeOf = goog.typeOf;52export const isArrayLike = goog.isArrayLike;53export const isDateLike = goog.isDateLike;54export const isObject = goog.isObject;55export const getUid = goog.getUid;56export const hasUid = goog.hasUid;57export const removeUid = goog.removeUid;58export const now = Date.now;59export const globalEval = goog.globalEval;60export const getCssName = goog.getCssName;61export const setCssNameMapping = goog.setCssNameMapping;62export const getMsg = goog.getMsg;63export const getMsgWithFallback = goog.getMsgWithFallback;64export const exportSymbol = goog.exportSymbol;65export const exportProperty = goog.exportProperty;66export const abstractMethod = goog.abstractMethod;67export const cloneObject = goog.cloneObject;68export const bind = goog.bind;69export const partial = goog.partial;70export const inherits = goog.inherits;71export const scope = goog.scope;72export const defineClass = goog.defineClass;73export const declareModuleId = goog.declareModuleId;7475// Export select properties of module. Do not export the function itself or76// goog.module.declareLegacyNamespace.77export const module = {78get: goog.module.get,79};8081// Omissions include:82// goog.ENABLE_DEBUG_LOADER - define only used in base.83// goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING - define only used in base.84// goog.provide - ES6 modules do not provide anything.85// goog.module - ES6 modules cannot be goog.modules.86// goog.module.declareLegacyNamespace - ES6 modules cannot declare namespaces.87// goog.addDependency - meant to only be used by dependency files.88// goog.DEPENDENCIES_ENABLED - constant only used in base.89// goog.loadModule - should not be called by any ES6 module; exists for90// generated bundles.91// goog.LOAD_MODULE_USING_EVAL - define only used in base.92// goog.SEAL_MODULE_EXPORTS - define only used in base.93// goog.DebugLoader - used rarely, only outside of compiled code.949596