angular/modules/angular2/src/testing/lang_utils.dart
Julie Ralph f529236bfc refactor(test): rename test_lib to testing
Old test_lib is now testing_internal
test_lib_public is now testing
2015-10-13 10:36:49 -07:00

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;
}