refactor(common): ensure compatibility with noImplicitOverride (#42512)
Adds the `override` keyword to the `common` sources to ensure compatibility with `noImplicitOverride`. PR Close #42512
This commit is contained in:
parent
ff87da36e7
commit
22290af178
|
@ -226,7 +226,7 @@ export class HttpHeaderResponse extends HttpResponseBase {
|
|||
super(init);
|
||||
}
|
||||
|
||||
readonly type: HttpEventType.ResponseHeader = HttpEventType.ResponseHeader;
|
||||
override readonly type: HttpEventType.ResponseHeader = HttpEventType.ResponseHeader;
|
||||
|
||||
/**
|
||||
* Copy this `HttpHeaderResponse`, overriding its contents with the
|
||||
|
@ -274,7 +274,7 @@ export class HttpResponse<T> extends HttpResponseBase {
|
|||
this.body = init.body !== undefined ? init.body : null;
|
||||
}
|
||||
|
||||
readonly type: HttpEventType.Response = HttpEventType.Response;
|
||||
override readonly type: HttpEventType.Response = HttpEventType.Response;
|
||||
|
||||
clone(): HttpResponse<T>;
|
||||
clone(update: {headers?: HttpHeaders; status?: number; statusText?: string; url?: string;}):
|
||||
|
@ -324,7 +324,7 @@ export class HttpErrorResponse extends HttpResponseBase implements Error {
|
|||
/**
|
||||
* Errors are never okay, even when the status code is in the 2xx success range.
|
||||
*/
|
||||
readonly ok = false;
|
||||
override readonly ok = false;
|
||||
|
||||
constructor(init: {
|
||||
error?: any;
|
||||
|
|
|
@ -57,7 +57,7 @@ class InterceptorC extends TestInterceptor {
|
|||
super('C');
|
||||
}
|
||||
|
||||
intercept(req: HttpRequest<any>, delegate: HttpHandler): Observable<HttpEvent<any>> {
|
||||
override intercept(req: HttpRequest<any>, delegate: HttpHandler): Observable<HttpEvent<any>> {
|
||||
if (req.context.get(IS_INTERCEPTOR_C_ENABLED) === true) {
|
||||
return super.intercept(req, delegate);
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ export class HashLocationStrategy extends LocationStrategy implements OnDestroy
|
|||
this._platformLocation.back();
|
||||
}
|
||||
|
||||
historyGo(relativePosition: number = 0): void {
|
||||
override historyGo(relativePosition: number = 0): void {
|
||||
this._platformLocation.historyGo?.(relativePosition);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ export class PathLocationStrategy extends LocationStrategy implements OnDestroy
|
|||
this._platformLocation.back();
|
||||
}
|
||||
|
||||
historyGo(relativePosition: number = 0): void {
|
||||
override historyGo(relativePosition: number = 0): void {
|
||||
this._platformLocation.historyGo?.(relativePosition);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ export class BrowserPlatformLocation extends PlatformLocation {
|
|||
this._history.back();
|
||||
}
|
||||
|
||||
historyGo(relativePosition: number = 0): void {
|
||||
override historyGo(relativePosition: number = 0): void {
|
||||
this._history.go(relativePosition);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue