diff --git a/packages/common/http/src/response.ts b/packages/common/http/src/response.ts index 8ce1a92f3aa..b0693f6a6cc 100644 --- a/packages/common/http/src/response.ts +++ b/packages/common/http/src/response.ts @@ -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 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; 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; diff --git a/packages/common/http/test/module_spec.ts b/packages/common/http/test/module_spec.ts index ef8a866be95..84411dba026 100644 --- a/packages/common/http/test/module_spec.ts +++ b/packages/common/http/test/module_spec.ts @@ -57,7 +57,7 @@ class InterceptorC extends TestInterceptor { super('C'); } - intercept(req: HttpRequest, delegate: HttpHandler): Observable> { + override intercept(req: HttpRequest, delegate: HttpHandler): Observable> { if (req.context.get(IS_INTERCEPTOR_C_ENABLED) === true) { return super.intercept(req, delegate); } diff --git a/packages/common/src/location/hash_location_strategy.ts b/packages/common/src/location/hash_location_strategy.ts index 91a23684153..413e69b4a7f 100644 --- a/packages/common/src/location/hash_location_strategy.ts +++ b/packages/common/src/location/hash_location_strategy.ts @@ -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); } } diff --git a/packages/common/src/location/location_strategy.ts b/packages/common/src/location/location_strategy.ts index 8deebd06a84..d541784cd66 100644 --- a/packages/common/src/location/location_strategy.ts +++ b/packages/common/src/location/location_strategy.ts @@ -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); } } diff --git a/packages/common/src/location/platform_location.ts b/packages/common/src/location/platform_location.ts index 4b85a61aea4..02afc7f4912 100644 --- a/packages/common/src/location/platform_location.ts +++ b/packages/common/src/location/platform_location.ts @@ -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); }