angular-cn/modules/@angular/core/testing/lang_utils.dart

11 lines
259 B
Dart
Raw Normal View History

library testing.lang_utils;
2015-03-30 10:37:33 -04:00
import 'dart:mirrors';
Type getTypeOf(instance) => instance.runtimeType;
dynamic instantiateType(Type type, [List params = const []]) {
var cm = reflectClass(type);
return cm.newInstance(new Symbol(''), params).reflectee;
}