https://github.com/angular/angular
Raw File
Tip revision: 912068e71c652f72dcf87ff71e0bda0068b38d95 authored by Chuck Jazdzewski on 12 October 2017, 17:26:21 UTC
docs: add changelog for 4.4.5
Tip revision: 912068e
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