https://github.com/angular/angular
Raw File
Tip revision: 33f812016427d0d124abd1dca661d52de2bb9f4f authored by Igor Minar on 06 April 2018, 23:33:44 UTC
docs: add changelog for 6.0.0-rc.3
Tip revision: 33f8120
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