mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
f529236bfc
Old test_lib is now testing_internal test_lib_public is now testing
10 lines
259 B
TypeScript
10 lines
259 B
TypeScript
export function getTypeOf(instance) {
|
|
return instance.constructor;
|
|
}
|
|
|
|
export function instantiateType(type: Function, params: any[] = []) {
|
|
var instance = Object.create(type.prototype);
|
|
instance.constructor.apply(instance, params);
|
|
return instance;
|
|
}
|