refactor(router): ensure compatibility with noImplicitOverride (#42512)

Adds the `override` keyword to the `router` sources to ensure
compatibility with `noImplicitOverride`.

PR Close #42512
This commit is contained in:
Paul Gschwendtner 2021-06-07 21:03:42 +02:00 committed by Andrew Kushnir
parent 8948c93024
commit abc77a6a39
2 changed files with 11 additions and 11 deletions

View File

@ -100,7 +100,7 @@ export class NavigationStart extends RouterEvent {
}
/** @docsNotRequired */
toString(): string {
override toString(): string {
return `NavigationStart(id: ${this.id}, url: '${this.url}')`;
}
}
@ -126,7 +126,7 @@ export class NavigationEnd extends RouterEvent {
}
/** @docsNotRequired */
toString(): string {
override toString(): string {
return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${
this.urlAfterRedirects}')`;
}
@ -155,7 +155,7 @@ export class NavigationCancel extends RouterEvent {
}
/** @docsNotRequired */
toString(): string {
override toString(): string {
return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;
}
}
@ -181,7 +181,7 @@ export class NavigationError extends RouterEvent {
}
/** @docsNotRequired */
toString(): string {
override toString(): string {
return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;
}
}
@ -205,7 +205,7 @@ export class RoutesRecognized extends RouterEvent {
}
/** @docsNotRequired */
toString(): string {
override toString(): string {
return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${
this.urlAfterRedirects}', state: ${this.state})`;
}
@ -231,7 +231,7 @@ export class GuardsCheckStart extends RouterEvent {
super(id, url);
}
toString(): string {
override toString(): string {
return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${
this.urlAfterRedirects}', state: ${this.state})`;
}
@ -259,7 +259,7 @@ export class GuardsCheckEnd extends RouterEvent {
super(id, url);
}
toString(): string {
override toString(): string {
return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${
this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;
}
@ -288,7 +288,7 @@ export class ResolveStart extends RouterEvent {
super(id, url);
}
toString(): string {
override toString(): string {
return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${
this.urlAfterRedirects}', state: ${this.state})`;
}
@ -313,7 +313,7 @@ export class ResolveEnd extends RouterEvent {
super(id, url);
}
toString(): string {
override toString(): string {
return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${
this.urlAfterRedirects}', state: ${this.state})`;
}

View File

@ -59,7 +59,7 @@ export class RouterState extends Tree<ActivatedRoute> {
setRouterState(<RouterState>this, root);
}
toString(): string {
override toString(): string {
return this.snapshot.toString();
}
}
@ -421,7 +421,7 @@ export class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
setRouterState(<RouterStateSnapshot>this, root);
}
toString(): string {
override toString(): string {
return serializeNode(this._root);
}
}