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

@ -37,7 +37,7 @@ class _MyComponent_ChangeDetector0 extends _gen.AbstractChangeDetector {
dynamic dispatcher, this._protos, this._directiveRecords)
: super("MyComponent_comp_0", dispatcher) {
_context = null;
_myNum0 = _interpolate1 = _gen.ChangeDetectionUtil.uninitialized();
_myNum0 = _interpolate1 = _gen.ChangeDetectionUtil.uninitialized;
}
void detectChangesInRecords(throwOnChange) {
@ -108,7 +108,7 @@ class _MyComponent_ChangeDetector0 extends _gen.AbstractChangeDetector {
void dehydrate() {
_context = null;
_myNum0 = _interpolate1 = _gen.ChangeDetectionUtil.uninitialized();
_myNum0 = _interpolate1 = _gen.ChangeDetectionUtil.uninitialized;
_locals = null;
_pipes = null;
}