refactor: ensure compatibility with noImplicitOverride for examples (#42512)

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

PR Close #42512
This commit is contained in:
Paul Gschwendtner 2021-06-07 21:06:06 +02:00 committed by Andrew Kushnir
parent 5b5868d592
commit 1dffa51808
2 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ class MyApp {
}
class MyUrlResolver extends UrlResolver {
resolve(baseUrl: string, url: string): string {
override resolve(baseUrl: string, url: string): string {
// Serve CSS files from a special CDN.
if (url.substr(-4) === '.css') {
return super.resolve('http://cdn.myapp.com/css/', url);

View File

@ -62,7 +62,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
}
class Square extends Shape {
name = 'square';
override name = 'square';
}
const injector = ReflectiveInjector.resolveAndCreate([{provide: Shape, useClass: Square}]);
@ -80,7 +80,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
}
class FormalGreeting extends Greeting {
salutation = 'Greetings';
override salutation = 'Greetings';
}
const injector = ReflectiveInjector.resolveAndCreate(
@ -101,7 +101,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
}
class Square extends Shape {
name = 'square';
override name = 'square';
}
const injector =
@ -120,7 +120,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
}
class FormalGreeting extends Greeting {
salutation = 'Greetings';
override salutation = 'Greetings';
}
const injector = Injector.create({
@ -161,7 +161,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
}
class FormalGreeting extends Greeting {
salutation = 'Greetings';
override salutation = 'Greetings';
}
const injector = Injector.create({