Skip to content

Commit 3473061

Browse files
committed
refactor: ensure compatibility with noImplicitOverride for examples
Adds the `override` keyword to the `examples` sources to ensure compatibility with `noImplicitOverride`.
1 parent 247ef1c commit 3473061

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/examples/compiler/ts/url_resolver/url_resolver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MyApp {
1616
}
1717

1818
class MyUrlResolver extends UrlResolver {
19-
resolve(baseUrl: string, url: string): string {
19+
override resolve(baseUrl: string, url: string): string {
2020
// Serve CSS files from a special CDN.
2121
if (url.substr(-4) === '.css') {
2222
return super.resolve('http://cdn.myapp.com/css/', url);

packages/examples/core/di/ts/provider_spec.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
6262
}
6363

6464
class Square extends Shape {
65-
name = 'square';
65+
override name = 'square';
6666
}
6767

6868
const injector = ReflectiveInjector.resolveAndCreate([{provide: Shape, useClass: Square}]);
@@ -80,7 +80,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
8080
}
8181

8282
class FormalGreeting extends Greeting {
83-
salutation = 'Greetings';
83+
override salutation = 'Greetings';
8484
}
8585

8686
const injector = ReflectiveInjector.resolveAndCreate(
@@ -101,7 +101,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
101101
}
102102

103103
class Square extends Shape {
104-
name = 'square';
104+
override name = 'square';
105105
}
106106

107107
const injector =
@@ -120,7 +120,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
120120
}
121121

122122
class FormalGreeting extends Greeting {
123-
salutation = 'Greetings';
123+
override salutation = 'Greetings';
124124
}
125125

126126
const injector = Injector.create({
@@ -161,7 +161,7 @@ import {Injectable, InjectionToken, Injector, Optional, ReflectiveInjector} from
161161
}
162162

163163
class FormalGreeting extends Greeting {
164-
salutation = 'Greetings';
164+
override salutation = 'Greetings';
165165
}
166166

167167
const injector = Injector.create({

0 commit comments

Comments
 (0)