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:
@ -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 : {};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user