feat(http): refactor library to work in dart
Mostly internal refactoring needed to make ts2dart and DartAnalyzer happy. Fixes #2415
This commit is contained in:
@ -11,6 +11,8 @@ class Math {
|
||||
static double random() => _random.nextDouble();
|
||||
}
|
||||
|
||||
int ENUM_INDEX(value) => value.index;
|
||||
|
||||
class CONST {
|
||||
const CONST();
|
||||
}
|
||||
|
@ -31,6 +31,11 @@ _global.assert = function assert(condition) {
|
||||
_global['assert'].call(condition);
|
||||
}
|
||||
};
|
||||
|
||||
export function ENUM_INDEX(value: int): int {
|
||||
return value;
|
||||
}
|
||||
|
||||
// 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 {
|
||||
|
Reference in New Issue
Block a user