fix(router): allow UrlMatcher to return null (#36402)
The matcher is allowed to return null per https://angular.io/api/router/UrlMatcher#usage-notes And run `yarn gulp format` to pick up recent clang format changes. Closes #29824 BREAKING CHANGE: UrlMatcher's type now reflects that it could always return null. If you implemented your own Router or Recognizer class, please update it to handle matcher returning null. PR Close #36402
This commit is contained in:

committed by
Kara Erickson

parent
a555fdba32
commit
568e9df1d6
2
goldens/public-api/router/router.d.ts
vendored
2
goldens/public-api/router/router.d.ts
vendored
@ -500,7 +500,7 @@ export declare abstract class UrlHandlingStrategy {
|
||||
abstract shouldProcessUrl(url: UrlTree): boolean;
|
||||
}
|
||||
|
||||
export declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult;
|
||||
export declare type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) => UrlMatchResult | null;
|
||||
|
||||
export declare type UrlMatchResult = {
|
||||
consumed: UrlSegment[];
|
||||
|
Reference in New Issue
Block a user