refactor(change_detect): Make ChangeDetectionUtil#uninitialized a var

Previously, `uninitialized()` was a method, requiring a call as well as
two extra characters everywhere it was used.

Make this value a variable, saving the characters and avoiding the
method call to get its value.

This change also removes the export of `uninitialized` from
change_detect.ts, which is technically a breaking change, however
`uninitialized` is an implementation detail and nobody should be using
it in app logic. By convention, apps should not be importing from files
under `src/`.

Update to #3248.
This commit is contained in:
Tim Blasi
2015-07-27 16:18:51 -07:00
parent 8a91d71625
commit 03fc7fe8c2
7 changed files with 13 additions and 16 deletions

View File

@ -256,7 +256,7 @@ class _CodegenState {
var pipeType = r.name;
return '''
$_CURRENT_PROTO = $_PROTOS_ACCESSOR[$protoIndex];
if ($_IDENTICAL_CHECK_FN($pipe, $_UTIL.uninitialized())) {
if ($_IDENTICAL_CHECK_FN($pipe, $_UTIL.uninitialized)) {
$pipe = $_PIPES_ACCESSOR.get('$pipeType', $context, $cdRef);
} else if (!$pipe.supports($context)) {
$pipe.onDestroy();