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

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