https://github.com/angular/angular
Raw File
Tip revision: eb52d9eabd13100ef5dc10f1934d2b8455fa1cdc authored by Jessica Janiuk on 14 December 2022, 19:54:33 UTC
release: cut the v15.1.0-next.3 release
Tip revision: eb52d9e
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