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

@ -36,14 +36,15 @@ class InheritedFromParent {
}
}
export function recognize(rootComponentType: Type, config: Routes, urlTree: UrlTree, url: string):
Observable<RouterStateSnapshot> {
export function recognize(
rootComponentType: Type<any>, config: Routes, urlTree: UrlTree,
url: string): Observable<RouterStateSnapshot> {
return new Recognizer(rootComponentType, config, urlTree, url).recognize();
}
class Recognizer {
constructor(
private rootComponentType: Type, private config: Routes, private urlTree: UrlTree,
private rootComponentType: Type<any>, private config: Routes, private urlTree: UrlTree,
private url: string) {}
recognize(): Observable<RouterStateSnapshot> {
@ -349,4 +350,4 @@ function getData(route: Route): Data {
function getResolve(route: Route): ResolveData {
return route.resolve ? route.resolve : {};
}
}