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:
parent
5b5868d592
commit
1dffa51808
|
@ -16,7 +16,7 @@ class MyApp {
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyUrlResolver extends UrlResolver {
|
class MyUrlResolver extends UrlResolver {
|
||||||
resolve(baseUrl: string, url: string): string {
|
override resolve(baseUrl: string, url: string): string {
|
||||||
// Serve CSS files from a special CDN.
|
// Serve CSS files from a special CDN.
|
||||||
if (url.substr(-4) === '.css') {
|
if (url.substr(-4) === '.css') {
|
||||||
return super.resolve('http://cdn.myapp.com/css/', url);
|
return super.resolve('http://cdn.myapp.com/css/', url);
|
||||||
|
|
|
@ -62,7 +62,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
|
||||||
}
|
}
|
||||||
|
|
||||||
class Square extends Shape {
|
class Square extends Shape {
|
||||||
name = 'square';
|
override name = 'square';
|
||||||
}
|
}
|
||||||
|
|
||||||
const injector = ReflectiveInjector.resolveAndCreate([{provide: Shape, useClass: Square}]);
|
const injector = ReflectiveInjector.resolveAndCreate([{provide: Shape, useClass: Square}]);
|
||||||
|
@ -80,7 +80,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
|
||||||
}
|
}
|
||||||
|
|
||||||
class FormalGreeting extends Greeting {
|
class FormalGreeting extends Greeting {
|
||||||
salutation = 'Greetings';
|
override salutation = 'Greetings';
|
||||||
}
|
}
|
||||||
|
|
||||||
const injector = ReflectiveInjector.resolveAndCreate(
|
const injector = ReflectiveInjector.resolveAndCreate(
|
||||||
|
@ -101,7 +101,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
|
||||||
}
|
}
|
||||||
|
|
||||||
class Square extends Shape {
|
class Square extends Shape {
|
||||||
name = 'square';
|
override name = 'square';
|
||||||
}
|
}
|
||||||
|
|
||||||
const injector =
|
const injector =
|
||||||
|
@ -120,7 +120,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
|
||||||
}
|
}
|
||||||
|
|
||||||
class FormalGreeting extends Greeting {
|
class FormalGreeting extends Greeting {
|
||||||
salutation = 'Greetings';
|
override salutation = 'Greetings';
|
||||||
}
|
}
|
||||||
|
|
||||||
const injector = Injector.create({
|
const injector = Injector.create({
|
||||||
|
@ -161,7 +161,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
|
||||||
}
|
}
|
||||||
|
|
||||||
class FormalGreeting extends Greeting {
|
class FormalGreeting extends Greeting {
|
||||||
salutation = 'Greetings';
|
override salutation = 'Greetings';
|
||||||
}
|
}
|
||||||
|
|
||||||
const injector = Injector.create({
|
const injector = Injector.create({
|
||||||
|
|
Loading…
Reference in New Issue