feat(change_detection): ensure that expression do not change after they have been checked

This commit is contained in:
vsavkin
2014-12-04 18:30:54 -08:00
parent d02e192951
commit 8acf9fb609
11 changed files with 123 additions and 27 deletions

View File

@ -169,3 +169,12 @@ bool isJsObject(o) {
return false;
}
assertionsEnabled() {
try {
assert(false);
return false;
} catch (e) {
return true;
}
}

View File

@ -206,3 +206,12 @@ export function normalizeBlank(obj) {
export function isJsObject(o):boolean {
return o !== null && (typeof o === "function" || typeof o === "object");
}
export function assertionsEnabled() {
try {
var x:int = "string";
return false;
} catch (e) {
return true;
}
}