refactor(upgrade): avoid mutable exports. (#34232) (#34960)

Previously, create_angular_testing_module would export a mutable `let`
binding. The binding is already exporting using an accessor function
though, so the export on the let variable seems like an accidental
oversight.

This is functionally equivalent, but makes it easier for module
optimizers such as Closure Compiler to track down side effects and prune
modules.

PR Close #34232

PR Close #34960
This commit is contained in:
Martin Probst
2019-12-04 16:59:05 +01:00
committed by Andrew Kushnir
parent 03f0f43fe0
commit b9adcf9ebc

View File

@ -12,7 +12,7 @@ import * as angular from '../../../src/common/src/angular1';
import {$INJECTOR, INJECTOR_KEY, UPGRADE_APP_TYPE_KEY} from '../../../src/common/src/constants';
import {UpgradeAppType} from '../../../src/common/src/util';
export let $injector: angular.IInjectorService|null = null;
let $injector: angular.IInjectorService|null = null;
let injector: Injector;
export function $injectorFactory() {