https://github.com/angular/angular
Raw File
Tip revision: cbfe6284a2cb4a0e5f8d88f833de7341d478250d authored by Jessica Janiuk on 13 April 2022, 18:27:48 UTC
release: cut the v13.3.3 release (#45614)
Tip revision: cbfe628
lang_utils.ts
/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

export function getTypeOf(instance: any /** TODO #9100 */) {
  return instance.constructor;
}

export function instantiateType(type: Function, params: any[] = []) {
  return new (<any>type)(...params);
}
back to top