GeezerVison is showing github.com — --noImplicitOverride by Kingwl · Pull Request #39669 · microsoft/TypeScript
Conversation
Related #38905 , #9034
Fixes #2000
This pr added the override keyword to mark the class method is overrides a method in the base class.
And a flag called noImplicitOverride and don't break something.
Basically, If the flag turns on, We add the below check.
-
used without noImplicitOverride flag: ok but less check
-
If a class member has override modifier and the container class does not extend any class: error
-
if a class member has override modifier and the name of the method is not existed in the base class: error
-
if a class member do not has override modifier and the name of the method is exited in the base class: error
-
properties are the same as the method.
-
node in ambient context: not check.
-
must before accessibility modifier
-
cannot be used with the declare static modifier.
-
cannot be used with a constructor.
Something needs to consider:
-
class declaration in Ambient context. Should we issue errors in the d.ts files? As Suggestion Backlog Slog, 6/8/2016 #9034 said. Looks needn't.
-
abstract method or abstract class:
eg:
abstract class AB {
abstract foo(v: string): void;
abstract bar(v: string): void
}
abstract class AD1 extends AB {
}
abstract class AD2 extends AB {
abstract foo(v: ''): void // need override?
}
abstract class AD3 extends AB {
override foo(v: ''): void { } // need override?
abstract bar(): void; // need override?
}
class D4 extends AB {
override foo(v: ''): void {}
override bar(v: ''): void {}
}
- property in constructor parameters:
eg:
class B {
public baz: number = 1;
constructor(public foo: string, public bar: number) {
}
}
class D extends B {
override public bar: number = 1
// override required ?
constructor(public foo: string, public baz: number) {
super(foo, 42)
}
}
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
alexrock, ifiokjr, rowbotman, InExtremaRes, Dionis-mgn, soncodi, cherryblossom000, J-Fields, dested, intellild, and 54 more reacted with thumbs up emoji
achimmihca, likern, c9r, Trass3r, krozner, kirillgroshkov, Basssiiie, celian-rib, mass10, kaznovac, and 4 more reacted with heart emoji
mass10, kaznovac, jonlepage, Enteleform, and LittleIronMan reacted with rocket emoji
Jack-Works, mass10, kirillgroshkov, and celian-rib reacted with eyes emoji
All reactions
-
👍
64 reactions
-
❤️
14 reactions
-
🚀
5 reactions
-
👀
4 reactions
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Hey Wenlu Wang (@Kingwl), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:
{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/80234/artifacts?artifactName=tgz&fileId=24EB196251C0700ECE50C8E4EF36FFE41ECC147DC5822099E673D2E05A67AFE302&fileName=/typescript-4.0.0-insiders.20200720.tgz"
}
}
and then running npm install.
There is also a playground for this build.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Emmmm.... Need review and feedback
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Hey Wenlu Wang (@Kingwl), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:
{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/82712/artifacts?artifactName=tgz&fileId=F20A5C267D30CCAF558DD8B90945444BF1ECAF2C9D1D3EF7D1AECB09BA31230402&fileName=/typescript-4.1.0-insiders.20200819.tgz"
}
}
and then running npm install.
There is also a playground for this build.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Yeah, I doubt we'll see anything significant, and I will likely merge if it's not too crazy seeing as we can optimize later.
|
Kingwl, whzx5byb, alex-okrushko, Basssiiie, a11delavar, felixhirt, and v1rtl reacted with hooray emoji
Kingwl, a11delavar, and v1rtl reacted with heart emoji
Kingwl, alexrock, a11delavar, and v1rtl reacted with rocket emoji
Kingwl, a11delavar, and v1rtl reacted with eyes emoji
All reactions
-
🎉
7 reactions
-
❤️
3 reactions
-
🚀
4 reactions
-
👀
3 reactions
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Daniel Rosenwasser (@DanielRosenwasser)
The results of the perf run you requested are in!
Here they are:
Comparison Report - master..39669
| Metric |
master |
39669 |
Delta |
Best |
Worst |
| Angular - node (v14.15.1, x64) |
| Memory used |
321,274k (± 0.01%) |
321,290k (± 0.01%) |
+16k (+ 0.01%) |
321,215k |
321,438k |
| Parse Time |
1.93s (± 0.43%) |
1.93s (± 0.61%) |
-0.00s (- 0.21%) |
1.91s |
1.96s |
| Bind Time |
0.86s (± 0.57%) |
0.85s (± 0.80%) |
-0.01s (- 1.04%) |
0.84s |
0.87s |
| Check Time |
5.01s (± 0.46%) |
5.01s (± 0.37%) |
+0.01s (+ 0.14%) |
4.96s |
5.05s |
| Emit Time |
6.33s (± 0.48%) |
6.35s (± 0.63%) |
+0.03s (+ 0.43%) |
6.26s |
6.44s |
| Total Time |
14.13s (± 0.28%) |
14.15s (± 0.33%) |
+0.02s (+ 0.12%) |
14.07s |
14.29s |
| Compiler-Unions - node (v14.15.1, x64) |
| Memory used |
189,310k (± 0.01%) |
189,355k (± 0.01%) |
+45k (+ 0.02%) |
189,314k |
189,397k |
| Parse Time |
0.80s (± 0.69%) |
0.80s (± 0.87%) |
-0.00s (- 0.12%) |
0.79s |
0.82s |
| Bind Time |
0.56s (± 0.40%) |
0.56s (± 0.67%) |
-0.01s (- 1.07%) |
0.55s |
0.56s |
| Check Time |
7.07s (± 0.59%) |
7.03s (± 0.62%) |
-0.04s (- 0.62%) |
6.95s |
7.14s |
| Emit Time |
2.54s (± 0.52%) |
2.54s (± 0.89%) |
+0.00s (+ 0.08%) |
2.50s |
2.60s |
| Total Time |
10.97s (± 0.36%) |
10.93s (± 0.54%) |
-0.05s (- 0.44%) |
10.82s |
11.08s |
| Monaco - node (v14.15.1, x64) |
| Memory used |
323,900k (± 0.01%) |
323,966k (± 0.01%) |
+66k (+ 0.02%) |
323,941k |
324,008k |
| Parse Time |
1.56s (± 0.43%) |
1.56s (± 0.82%) |
-0.00s (- 0.00%) |
1.53s |
1.58s |
| Bind Time |
0.75s (± 0.80%) |
0.75s (± 0.92%) |
-0.00s (- 0.13%) |
0.73s |
0.76s |
| Check Time |
5.03s (± 0.54%) |
5.02s (± 0.52%) |
-0.01s (- 0.26%) |
4.98s |
5.10s |
| Emit Time |
3.18s (± 0.92%) |
3.17s (± 0.58%) |
-0.00s (- 0.16%) |
3.13s |
3.22s |
| Total Time |
10.52s (± 0.45%) |
10.50s (± 0.36%) |
-0.02s (- 0.16%) |
10.42s |
10.59s |
| TFS - node (v14.15.1, x64) |
| Memory used |
287,541k (± 0.01%) |
287,629k (± 0.01%) |
+88k (+ 0.03%) |
287,549k |
287,673k |
| Parse Time |
1.26s (± 1.13%) |
1.25s (± 1.41%) |
-0.00s (- 0.16%) |
1.22s |
1.28s |
| Bind Time |
0.72s (± 0.62%) |
0.72s (± 0.69%) |
-0.00s (- 0.28%) |
0.71s |
0.73s |
| Check Time |
4.65s (± 0.59%) |
4.66s (± 0.31%) |
+0.01s (+ 0.19%) |
4.63s |
4.69s |
| Emit Time |
3.26s (± 0.71%) |
3.26s (± 0.81%) |
-0.00s (- 0.03%) |
3.20s |
3.32s |
| Total Time |
9.88s (± 0.42%) |
9.89s (± 0.28%) |
+0.00s (+ 0.05%) |
9.83s |
9.94s |
| material-ui - node (v14.15.1, x64) |
| Memory used |
441,841k (± 0.06%) |
441,985k (± 0.00%) |
+144k (+ 0.03%) |
441,949k |
442,005k |
| Parse Time |
2.07s (± 0.62%) |
2.09s (± 0.36%) |
+0.02s (+ 0.82%) |
2.07s |
2.10s |
| Bind Time |
0.69s (± 0.69%) |
0.69s (± 0.43%) |
-0.00s (- 0.14%) |
0.69s |
0.70s |
| Check Time |
13.02s (± 0.60%) |
12.91s (± 0.27%) |
-0.11s (- 0.85%) |
12.84s |
13.00s |
| Emit Time |
0.00s (± 0.00%) |
0.00s (± 0.00%) |
0.00s ( NaN%) |
0.00s |
0.00s |
| Total Time |
15.79s (± 0.53%) |
15.69s (± 0.24%) |
-0.09s (- 0.60%) |
15.60s |
15.78s |
System
| Machine Name | ts-ci-ubuntu |
| Platform | linux 4.4.0-198-generic |
| Architecture | x64 |
| Available Memory | 16 GB |
| Available Memory | 4 GB |
| CPUs | 4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz |
Scenarios
- Angular - node (v14.15.1, x64)
- Compiler-Unions - node (v14.15.1, x64)
- Monaco - node (v14.15.1, x64)
- TFS - node (v14.15.1, x64)
- material-ui - node (v14.15.1, x64)
| Benchmark |
Name |
Iterations |
| Current |
39669 |
10 |
| Baseline |
master |
10 |
Developer Information:Download Benchmark
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The benchmark looks good, at least with the option off.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Daniel Rosenwasser (@DanielRosenwasser)
The results of the perf run you requested are in!
Here they are:
Comparison Report - master..39669
| Metric |
master |
39669 |
Delta |
Best |
Worst |
| Angular - node (v10.16.3, x64) |
| Memory used |
344,876k (± 0.02%) |
344,936k (± 0.02%) |
+60k (+ 0.02%) |
344,745k |
345,113k |
| Parse Time |
1.95s (± 0.55%) |
1.93s (± 0.63%) |
-0.02s (- 1.03%) |
1.90s |
1.96s |
| Bind Time |
0.84s (± 0.84%) |
0.83s (± 0.69%) |
-0.01s (- 1.07%) |
0.82s |
0.85s |
| Check Time |
5.09s (± 0.35%) |
5.08s (± 0.39%) |
-0.01s (- 0.16%) |
5.04s |
5.12s |
| Emit Time |
5.94s (± 0.72%) |
5.91s (± 0.60%) |
-0.03s (- 0.45%) |
5.85s |
6.00s |
| Total Time |
13.81s (± 0.45%) |
13.75s (± 0.31%) |
-0.06s (- 0.46%) |
13.67s |
13.86s |
| Compiler-Unions - node (v10.16.3, x64) |
| Memory used |
203,133k (± 0.12%) |
203,224k (± 0.03%) |
+91k (+ 0.04%) |
203,055k |
203,325k |
| Parse Time |
0.79s (± 0.87%) |
0.78s (± 0.67%) |
-0.00s (- 0.51%) |
0.77s |
0.79s |
| Bind Time |
0.53s (± 1.25%) |
0.52s (± 1.28%) |
-0.01s (- 1.89%) |
0.51s |
0.53s |
| Check Time |
7.55s (± 0.67%) |
7.46s (± 0.97%) |
-0.09s (- 1.23%) |
7.32s |
7.66s |
| Emit Time |
2.61s (± 1.08%) |
2.58s (± 0.99%) |
-0.04s (- 1.42%) |
2.52s |
2.62s |
| Total Time |
11.48s (± 0.59%) |
11.34s (± 0.77%) |
-0.14s (- 1.25%) |
11.21s |
11.59s |
| Monaco - node (v10.16.3, x64) |
| Memory used |
342,681k (± 0.04%) |
342,621k (± 0.02%) |
-60k (- 0.02%) |
342,485k |
342,747k |
| Parse Time |
1.56s (± 0.89%) |
1.55s (± 0.50%) |
-0.01s (- 0.64%) |
1.53s |
1.56s |
| Bind Time |
0.74s (± 0.78%) |
0.73s (± 1.21%) |
-0.01s (- 1.21%) |
0.72s |
0.76s |
| Check Time |
5.24s (± 0.48%) |
5.22s (± 0.51%) |
-0.01s (- 0.27%) |
5.16s |
5.28s |
| Emit Time |
3.13s (± 0.31%) |
3.12s (± 0.48%) |
-0.01s (- 0.38%) |
3.07s |
3.14s |
| Total Time |
10.67s (± 0.35%) |
10.63s (± 0.41%) |
-0.04s (- 0.39%) |
10.52s |
10.73s |
| TFS - node (v10.16.3, x64) |
| Memory used |
304,243k (± 0.03%) |
304,259k (± 0.03%) |
+16k (+ 0.01%) |
304,028k |
304,405k |
| Parse Time |
1.21s (± 0.62%) |
1.20s (± 0.74%) |
-0.01s (- 0.82%) |
1.19s |
1.23s |
| Bind Time |
0.70s (± 0.68%) |
0.70s (± 0.92%) |
-0.00s (- 0.14%) |
0.68s |
0.71s |
| Check Time |
4.72s (± 0.59%) |
4.71s (± 0.46%) |
-0.00s (- 0.02%) |
4.67s |
4.78s |
| Emit Time |
3.27s (± 0.93%) |
3.26s (± 1.12%) |
-0.01s (- 0.28%) |
3.17s |
3.32s |
| Total Time |
9.90s (± 0.49%) |
9.88s (± 0.52%) |
-0.02s (- 0.23%) |
9.77s |
10.01s |
| material-ui - node (v10.16.3, x64) |
| Memory used |
465,477k (± 0.01%) |
465,438k (± 0.02%) |
-39k (- 0.01%) |
465,260k |
465,623k |
| Parse Time |
2.02s (± 0.55%) |
2.01s (± 0.82%) |
-0.01s (- 0.35%) |
1.98s |
2.04s |
| Bind Time |
0.66s (± 1.33%) |
0.66s (± 0.75%) |
-0.01s (- 1.06%) |
0.65s |
0.67s |
| Check Time |
14.32s (± 0.67%) |
14.22s (± 0.42%) |
-0.09s (- 0.64%) |
14.13s |
14.43s |
| Emit Time |
0.00s (± 0.00%) |
0.00s (± 0.00%) |
0.00s ( NaN%) |
0.00s |
0.00s |
| Total Time |
17.00s (± 0.59%) |
16.89s (± 0.38%) |
-0.11s (- 0.62%) |
16.80s |
17.11s |
| Angular - node (v12.1.0, x64) |
| Memory used |
322,601k (± 0.02%) |
322,661k (± 0.03%) |
+61k (+ 0.02%) |
322,488k |
322,914k |
| Parse Time |
1.93s (± 0.48%) |
1.92s (± 0.82%) |
-0.01s (- 0.36%) |
1.89s |
1.96s |
| Bind Time |
0.81s (± 1.02%) |
0.82s (± 1.17%) |
+0.00s (+ 0.12%) |
0.80s |
0.84s |
| Check Time |
5.01s (± 0.40%) |
5.01s (± 0.51%) |
-0.00s (- 0.02%) |
4.97s |
5.07s |
| Emit Time |
6.04s (± 0.70%) |
5.99s (± 0.67%) |
-0.05s (- 0.78%) |
5.93s |
6.10s |
| Total Time |
13.79s (± 0.41%) |
13.74s (± 0.43%) |
-0.05s (- 0.36%) |
13.62s |
13.89s |
| Compiler-Unions - node (v12.1.0, x64) |
| Memory used |
190,228k (± 0.23%) |
190,215k (± 0.13%) |
-13k (- 0.01%) |
189,506k |
190,784k |
| Parse Time |
0.78s (± 0.88%) |
0.77s (± 0.86%) |
-0.00s (- 0.26%) |
0.76s |
0.79s |
| Bind Time |
0.53s (± 0.63%) |
0.53s (± 0.76%) |
-0.00s (- 0.19%) |
0.52s |
0.54s |
| Check Time |
7.04s (± 0.75%) |
6.96s (± 0.45%) |
-0.07s (- 1.04%) |
6.88s |
7.05s |
| Emit Time |
2.56s (± 1.02%) |
2.56s (± 1.09%) |
+0.00s (+ 0.08%) |
2.50s |
2.61s |
| Total Time |
10.90s (± 0.61%) |
10.83s (± 0.32%) |
-0.07s (- 0.66%) |
10.76s |
10.90s |
| Monaco - node (v12.1.0, x64) |
| Memory used |
325,000k (± 0.02%) |
325,039k (± 0.02%) |
+39k (+ 0.01%) |
324,848k |
325,174k |
| Parse Time |
1.54s (± 0.61%) |
1.53s (± 0.87%) |
-0.01s (- 0.84%) |
1.51s |
1.57s |
| Bind Time |
0.72s (± 0.80%) |
0.72s (± 0.41%) |
-0.01s (- 0.69%) |
0.71s |
0.72s |
| Check Time |
5.09s (± 0.70%) |
5.08s (± 0.67%) |
-0.01s (- 0.14%) |
5.03s |
5.14s |
| Emit Time |
3.14s (± 0.78%) |
3.11s (± 0.74%) |
-0.03s (- 0.86%) |
3.07s |
3.17s |
| Total Time |
10.49s (± 0.60%) |
10.44s (± 0.53%) |
-0.05s (- 0.48%) |
10.34s |
10.58s |
| TFS - node (v12.1.0, x64) |
| Memory used |
288,703k (± 0.02%) |
288,748k (± 0.02%) |
+46k (+ 0.02%) |
288,655k |
288,904k |
| Parse Time |
1.21s (± 0.43%) |
1.20s (± 1.00%) |
-0.01s (- 0.41%) |
1.17s |
1.23s |
| Bind Time |
0.70s (± 1.28%) |
0.69s (± 0.75%) |
-0.01s (- 1.01%) |
0.68s |
0.70s |
| Check Time |
4.65s (± 0.50%) |
4.63s (± 0.38%) |
-0.02s (- 0.39%) |
4.59s |
4.67s |
| Emit Time |
3.18s (± 0.66%) |
3.17s (± 0.98%) |
-0.00s (- 0.13%) |
3.11s |
3.25s |
| Total Time |
9.72s (± 0.41%) |
9.69s (± 0.49%) |
-0.03s (- 0.33%) |
9.59s |
9.81s |
| material-ui - node (v12.1.0, x64) |
| Memory used |
443,647k (± 0.01%) |
443,544k (± 0.05%) |
-103k (- 0.02%) |
442,584k |
443,743k |
| Parse Time |
2.04s (± 0.54%) |
2.03s (± 0.45%) |
-0.01s (- 0.44%) |
2.01s |
2.05s |
| Bind Time |
0.65s (± 1.05%) |
0.64s (± 0.73%) |
-0.01s (- 0.93%) |
0.63s |
0.65s |
| Check Time |
12.88s (± 0.56%) |
12.90s (± 0.72%) |
+0.02s (+ 0.12%) |
12.76s |
13.11s |
| Emit Time |
0.00s (± 0.00%) |
0.00s (± 0.00%) |
0.00s ( NaN%) |
0.00s |
0.00s |
| Total Time |
15.57s (± 0.51%) |
15.57s (± 0.65%) |
+0.00s (+ 0.02%) |
15.42s |
15.81s |
| Angular - node (v14.15.1, x64) |
| Memory used |
321,274k (± 0.01%) |
321,302k (± 0.01%) |
+28k (+ 0.01%) |
321,198k |
321,351k |
| Parse Time |
1.93s (± 0.43%) |
1.92s (± 0.46%) |
-0.01s (- 0.62%) |
1.91s |
1.95s |
| Bind Time |
0.86s (± 0.57%) |
0.86s (± 0.61%) |
-0.01s (- 0.58%) |
0.84s |
0.87s |
| Check Time |
5.01s (± 0.46%) |
5.00s (± 0.49%) |
-0.01s (- 0.10%) |
4.95s |
5.05s |
| Emit Time |
6.33s (± 0.48%) |
6.31s (± 0.52%) |
-0.02s (- 0.32%) |
6.21s |
6.35s |
| Total Time |
14.13s (± 0.28%) |
14.09s (± 0.37%) |
-0.04s (- 0.30%) |
13.99s |
14.20s |
| Compiler-Unions - node (v14.15.1, x64) |
| Memory used |
189,310k (± 0.01%) |
189,366k (± 0.01%) |
+57k (+ 0.03%) |
189,333k |
189,412k |
| Parse Time |
0.80s (± 0.69%) |
0.79s (± 0.63%) |
-0.01s (- 0.87%) |
0.79s |
0.81s |
| Bind Time |
0.56s (± 0.40%) |
0.55s (± 0.67%) |
-0.01s (- 1.07%) |
0.55s |
0.56s |
| Check Time |
7.07s (± 0.59%) |
7.06s (± 0.48%) |
-0.01s (- 0.11%) |
7.01s |
7.16s |
| Emit Time |
2.54s (± 0.52%) |
2.54s (± 0.41%) |
+0.00s (+ 0.00%) |
2.51s |
2.56s |
| Total Time |
10.97s (± 0.36%) |
10.95s (± 0.35%) |
-0.02s (- 0.19%) |
10.88s |
11.05s |
| Monaco - node (v14.15.1, x64) |
| Memory used |
323,900k (± 0.01%) |
323,953k (± 0.01%) |
+53k (+ 0.02%) |
323,905k |
324,010k |
| Parse Time |
1.56s (± 0.43%) |
1.56s (± 0.70%) |
-0.00s (- 0.13%) |
1.54s |
1.59s |
| Bind Time |
0.75s (± 0.80%) |
0.74s (± 0.66%) |
-0.00s (- 0.27%) |
0.74s |
0.76s |
| Check Time |
5.03s (± 0.54%) |
5.03s (± 0.44%) |
+0.00s (+ 0.02%) |
4.98s |
5.09s |
| Emit Time |
3.18s (± 0.92%) |
3.16s (± 0.39%) |
-0.02s (- 0.69%) |
3.13s |
3.19s |
| Total Time |
10.52s (± 0.45%) |
10.49s (± 0.26%) |
-0.03s (- 0.28%) |
10.43s |
10.56s |
| TFS - node (v14.15.1, x64) |
| Memory used |
287,541k (± 0.01%) |
287,632k (± 0.01%) |
+92k (+ 0.03%) |
287,559k |
287,674k |
| Parse Time |
1.26s (± 1.13%) |
1.24s (± 0.91%) |
-0.01s (- 1.19%) |
1.22s |
1.26s |
| Bind Time |
0.72s (± 0.62%) |
0.72s (± 1.49%) |
+0.00s (+ 0.14%) |
0.71s |
0.76s |
| Check Time |
4.65s (± 0.59%) |
4.64s (± 0.51%) |
-0.00s (- 0.04%) |
4.59s |
4.69s |
| Emit Time |
3.26s (± 0.71%) |
3.26s (± 0.70%) |
-0.01s (- 0.21%) |
3.19s |
3.30s |
| Total Time |
9.88s (± 0.42%) |
9.86s (± 0.39%) |
-0.02s (- 0.23%) |
9.76s |
9.92s |
| material-ui - node (v14.15.1, x64) |
| Memory used |
441,841k (± 0.06%) |
441,994k (± 0.00%) |
+154k (+ 0.03%) |
441,971k |
442,021k |
| Parse Time |
2.07s (± 0.62%) |
2.09s (± 0.52%) |
+0.02s (+ 1.06%) |
2.07s |
2.11s |
| Bind Time |
0.69s (± 0.69%) |
0.69s (± 0.43%) |
-0.00s (- 0.14%) |
0.69s |
0.70s |
| Check Time |
13.02s (± 0.60%) |
12.98s (± 0.47%) |
-0.04s (- 0.31%) |
12.90s |
13.12s |
| Emit Time |
0.00s (± 0.00%) |
0.00s (± 0.00%) |
0.00s ( NaN%) |
0.00s |
0.00s |
| Total Time |
15.79s (± 0.53%) |
15.76s (± 0.42%) |
-0.02s (- 0.13%) |
15.66s |
15.91s |
System
| Machine Name | ts-ci-ubuntu |
| Platform | linux 4.4.0-198-generic |
| Architecture | x64 |
| Available Memory | 16 GB |
| Available Memory | 4 GB |
| CPUs | 4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz |
Hosts
- node (v10.16.3, x64)
- node (v12.1.0, x64)
- node (v14.15.1, x64)
Scenarios
- Angular - node (v10.16.3, x64)
- Angular - node (v12.1.0, x64)
- Angular - node (v14.15.1, x64)
- Compiler-Unions - node (v10.16.3, x64)
- Compiler-Unions - node (v12.1.0, x64)
- Compiler-Unions - node (v14.15.1, x64)
- Monaco - node (v10.16.3, x64)
- Monaco - node (v12.1.0, x64)
- Monaco - node (v14.15.1, x64)
- TFS - node (v10.16.3, x64)
- TFS - node (v12.1.0, x64)
- TFS - node (v14.15.1, x64)
- material-ui - node (v10.16.3, x64)
- material-ui - node (v12.1.0, x64)
- material-ui - node (v14.15.1, x64)
| Benchmark |
Name |
Iterations |
| Current |
39669 |
10 |
| Baseline |
master |
10 |
Developer Information:Download Benchmark
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The compiler is complaining about the missing override keyword for constructor declared properties but it doesn't allow using the modifier on the constructor too.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
danfma reacted with rocket emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Yes.
On the left side, it's the original code. So, I tried to put the override in the constructor like protected override readonly context... the compiler will complain.
We had to use like in the right side to force the compiler to accept the code.

|
andrewbranch, Kingwl, InExtremaRes, and whzx5byb reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
By the way, this language feature fits me very well because I'm using an AST transformer to apply some Mobx decorators, and one of these modifiers is the “override” decorator! So, I can read the modifier and translate the code to what Mobx needs!
Thus, thank you! 😬
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Wenlu Wang (@Kingwl) I think we’re going to allow override in the parameter property, but I’m going to run it by the design meeting on Wednesday.
|
danfma reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Okay. Looking forward for the good news :XP
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I've problems with static fields and override: #43916
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
What about methods that implement interface (as opposed to base class) members?
|
hearnden, karol-depka, alanscodelog, and gdplouis reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
What about methods that implement interface (as opposed to base class) members?
No plan yet.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Is there a way to apply this to my entire project except to classes that inherit from a particular class (like React.Component, for example)?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Same question/need as Guilherme Simoes (@guilhermesimoes) - getting errors on state and render inside a React.Component is not helpful, but this flag would be very helpful outside of React (class) components.
without a way to exclude these (either by name, e.g. state, render, componentDidMount, etc.), or specifically for known React class properties (exceptReact or something), or even maybe include/exclude by directory or file extension (e.g. *.ts but not *.tsx), i can't use --noImplicitOverride in my project, but I have lots of non-React classes I'd love to have this protection apply to.
I realize that the TS team is not likely to want to have React-specific things in its codebase, but I just wanted to bring more attention to a common pain point with this feature for a subset of your users :)
Example errors for reference:
ERROR in src/SomeComponent/index.tsx:22:3
TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'Component<IProps, IState, any>'.
20 | IState
21 | > {
> 22 | state: IState = {}
| ^^^^^
23 |
24 | render() {
ERROR in src/SomeComponent/index.tsx:24:3
TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'Component<IProps, IState, any>'.
22 | state: IState = {}
23 |
> 24 | render() {
| ^^^^^^
25 | return (
|
guilhermesimoes reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|