https://github.com/angular/angular
Raw File
Tip revision: 5d7229e6b65a737f64a7c8ee3d14ec67f8a0a62d authored by Dylan Hunn on 06 October 2021, 18:47:13 UTC
release: cut the v13.0.0-next.13 release (#43741)
Tip revision: 5d7229e
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