refactor(platform-browser-dynamic): ensure compatibility with noImplicitOverride (#42512)

Adds the `override` keyword to the `platform-browser-dynamic` sources to ensure
compatibility with `noImplicitOverride`.

PR Close #42512
This commit is contained in:
Paul Gschwendtner 2021-06-07 21:02:34 +02:00 committed by Andrew Kushnir
parent a2975c7507
commit 48c9a0ddc6
2 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ class TestComponent {
}
class TestUrlResolver extends UrlResolver {
resolve(baseUrl: string, url: string): string {
override resolve(baseUrl: string, url: string): string {
// Don't use baseUrl to get the same URL as templateUrl.
// This is to remove any difference between Dart and TS tests.
return url;

View File

@ -19,14 +19,14 @@ export class DOMTestComponentRenderer extends TestComponentRenderer {
super();
}
insertRootElement(rootElId: string) {
override insertRootElement(rootElId: string) {
this.removeAllRootElements();
const rootElement = getDOM().getDefaultDocument().createElement('div');
rootElement.setAttribute('id', rootElId);
this._doc.body.appendChild(rootElement);
}
removeAllRootElements() {
override removeAllRootElements() {
// TODO(juliemr): can/should this be optional?
const oldRoots = this._doc.querySelectorAll('[id^=root]');
for (let i = 0; i < oldRoots.length; i++) {