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

11 lines
259 B
Dart

library testing.lang_utils;
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;
}