feat(lang): support const expressions in TS/JS and Dart

Closes #1796
This commit is contained in:
Pawel Kozlowski
2015-05-10 13:26:33 +02:00
parent e8ad0d1776
commit 4665726f48
2 changed files with 14 additions and 1 deletions

View File

@ -40,6 +40,11 @@ if (assertionsEnabled_) {
}
export {int};
// This function is needed only to properly support Dart's const expressions
// see https://github.com/angular/ts2dart/pull/151 for more info
export function CONST_EXPR<T>(expr: T): T {
return expr;
};
export function CONST() {
return (target) => target;
};