refactor(Type): merge Type and ConcreType<?> into Type<?> (#10616)

Closes #9729

BREAKING CHANGE:

`Type` is now `Type<T>` which means that in most cases you have to
use `Type<any>` in place of `Type`.

We don't expect that any user applications use the `Type` type.
This commit is contained in:
Miško Hevery
2016-08-10 18:21:28 -07:00
committed by vikerman
parent 6f4ee6101c
commit b96869afd2
91 changed files with 637 additions and 714 deletions

View File

@ -6,11 +6,12 @@
* found in the LICENSE file at https://angular.io/license
*/
import {BaseException, Injectable, PipeMetadata, resolveForwardRef} from '@angular/core';
import {Injectable, PipeMetadata, Type, resolveForwardRef} from '@angular/core';
import {ReflectorReader, reflector} from '../core_private';
import {Type, isPresent, stringify} from './facade/lang';
import {BaseException} from './facade/exceptions';
import {isPresent, stringify} from './facade/lang';
function _isPipeMetadata(type: any): boolean {
return type instanceof PipeMetadata;
@ -30,7 +31,7 @@ export class PipeResolver {
/**
* Return {@link PipeMetadata} for a given `Type`.
*/
resolve(type: Type, throwIfNotFound = true): PipeMetadata {
resolve(type: Type<any>, throwIfNotFound = true): PipeMetadata {
var metas = this._reflector.annotations(resolveForwardRef(type));
if (isPresent(metas)) {
var annotation = metas.find(_isPipeMetadata);