function addDeclaredGlobals(program,globalScope,config){var declaredGlobals={},exportedGlobals={},explicitGlobals={},builtin=Environments.get("builtin");(0,_assign4.default)(declaredGlobals,builtin);(0,_keys4.default)(config.env).forEach(function(name){if(config.env[name]){var env=Environments.get(name),environmentGlobals=env&&env.globals;if(environmentGlobals){(0,_assign4.default)(declaredGlobals,environmentGlobals);}}});(0,_assign4.default)(exportedGlobals,config.exported);(0,_assign4.default)(declaredGlobals,config.globals);(0,_assign4.default)(explicitGlobals,config.astGlobals);(0,_keys4.default)(declaredGlobals).forEach(function(name){var variable=globalScope.set.get(name);if(!variable){variable=new escope.Variable(name,globalScope);variable.eslintExplicitGlobal=false;globalScope.variables.push(variable);globalScope.set.set(name,variable);}variable.writeable=declaredGlobals[name];});(0,_keys4.default)(explicitGlobals).forEach(function(name){var variable=globalScope.set.get(name);if(!variable){variable=new escope.Variable(name,globalScope);variable.eslintExplicitGlobal=true;variable.eslintExplicitGlobalComment=explicitGlobals[name].comment;globalScope.variables.push(variable);globalScope.set.set(name,variable);}variable.writeable=explicitGlobals[name].value;});// mark all exported variables as such
(0,_keys4.default)(exportedGlobals).forEach(function(name){var variable=globalScope.set.get(name);if(variable){variable.eslintUsed=true;}});/*
     * "through" contains all references which definitions cannot be found.
     * Since we augment the global scope using configuration, we need to update
     * references and remove the ones that were added by configuration.
     */globalScope.through=globalScope.through.filter(function(reference){var name=reference.identifier.name;var variable=globalScope.set.get(name);if(variable){/*
             * Links the variable and the reference.
             * And this reference is removed from `Scope#through`.
             */reference.resolved=variable;variable.references.push(reference);return false;}return true;});}
Ensures that variables representing built-in properties of the Global Object,
and any globals declared by special block comments, are present in the global
scope.
@param {ASTNode} program The top node of the AST.
@param {Scope} globalScope The global scope.
@param {Object} config The existing configuration data.
@returns {void}