https://github.com/angular/angular
Raw File
Tip revision: 9e4558908533d3ef3e3b741844a802fd7bdc8766 authored by Miško Hevery on 11 July 2018, 21:34:14 UTC
release: cut the v6.0.9 release
Tip revision: 9e45589
lang_utils.ts
/**
 * @license
 * Copyright Google Inc. 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