GeezerVison is showing github.com — Added @ts-expect-error to @ts-ignore directives by JoshuaKGoldberg · Pull Request #36014 · microsoft/TypeScript
Conversation
Similar to // @ts-ignore, but will itself cause a new error diagnostic if it does not cause an existing diagnostic to be ignored.
Technical summary:
- The scanner will now keep track of
CommentDirectives it comes across: both @ts-expect-error and @ts-ignore
- During type checking, the program will turn those directives into a map keying them by line number
- For each diagnostic, if it's preceded by a directive, that directive is marked as "used"
- All
@ts-expect-error directives not marked as used generate a new diagnostic error
Fixes #29394
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
dragomirtitian, coalman, IllusionMH, orta, tjallingt, sindresorhus, bradzacher, davidgomes, ExE-Boss, deepsweet, and 29 more reacted with thumbs up emoji
svieira, leebyron, deepsweet, denis-sokolov, Mouvedia, ntucker, matthewoates, 0rvar, atsu85, sagarrth, and meatnordrink reacted with hooray emoji
0rvar, punksta, galdebert, atsu85, meatnordrink, cahogan, and bennycode reacted with heart emoji
All reactions
-
👍
39 reactions
-
🎉
11 reactions
-
❤️
7 reactions
Similar to `// @ts-ignore`, but will itself cause a new error diagnostic if it does not cause an existing diagnostic to be ignored.
Technical summary:
1. The scanner will now keep track of `CommentDirective`s it comes across: both `@ts-expect-error` and `@ts-ignore`
2. During type checking, the program will turn those directives into a map keying them by line number
3. For each diagnostic, if it's preceded by a directive, that directive is marked as "used"
4. All `@ts-expect-error` directives not marked as used generate a new diagnostic error
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.
|
Heya Orta Therox (@orta), I've started to run the tarball bundle task on this PR at eb5610a. You can monitor the build here. It should now contribute to this PR's status checks.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Orta Therox (@orta)
The results of the perf run you requested are in!
Here they are:
Comparison Report - master..36014
| Metric |
master |
36014 |
Delta |
Best |
Worst |
| Angular - node (v10.16.3, x64) |
| Memory used |
355,734k (± 0.01%) |
356,812k (± 0.02%) |
+1,078k (+ 0.30%) |
356,627k |
356,970k |
| Parse Time |
1.60s (± 0.37%) |
1.63s (± 0.59%) |
+0.02s (+ 1.50%) |
1.61s |
1.65s |
| Bind Time |
0.87s (± 0.66%) |
0.88s (± 0.66%) |
+0.01s (+ 1.15%) |
0.87s |
0.90s |
| Check Time |
4.58s (± 0.50%) |
4.58s (± 0.63%) |
-0.00s (- 0.02%) |
4.49s |
4.64s |
| Emit Time |
5.25s (± 0.56%) |
5.27s (± 0.62%) |
+0.02s (+ 0.42%) |
5.16s |
5.32s |
| Total Time |
12.31s (± 0.36%) |
12.37s (± 0.49%) |
+0.06s (+ 0.45%) |
12.14s |
12.43s |
| Monaco - node (v10.16.3, x64) |
| Memory used |
364,273k (± 0.01%) |
366,643k (± 0.01%) |
+2,369k (+ 0.65%) |
366,557k |
366,739k |
| Parse Time |
1.25s (± 0.52%) |
1.27s (± 0.59%) |
+0.01s (+ 1.20%) |
1.25s |
1.28s |
| Bind Time |
0.76s (± 0.48%) |
0.76s (± 0.65%) |
+0.00s (+ 0.13%) |
0.76s |
0.78s |
| Check Time |
4.62s (± 0.38%) |
4.73s (± 0.51%) |
+0.11s (+ 2.40%) |
4.67s |
4.78s |
| Emit Time |
2.94s (± 0.68%) |
2.96s (± 0.71%) |
+0.01s (+ 0.48%) |
2.91s |
3.01s |
| Total Time |
9.58s (± 0.39%) |
9.72s (± 0.42%) |
+0.14s (+ 1.45%) |
9.63s |
9.81s |
| TFS - node (v10.16.3, x64) |
| Memory used |
323,439k (± 0.02%) |
322,400k (± 0.02%) |
-1,038k (- 0.32%) |
322,272k |
322,517k |
| Parse Time |
0.95s (± 0.38%) |
0.97s (± 0.77%) |
+0.02s (+ 2.22%) |
0.95s |
0.99s |
| Bind Time |
0.74s (± 0.92%) |
0.74s (± 1.50%) |
+0.00s (+ 0.14%) |
0.72s |
0.76s |
| Check Time |
4.16s (± 0.55%) |
4.19s (± 0.61%) |
+0.03s (+ 0.79%) |
4.16s |
4.26s |
| Emit Time |
3.02s (± 0.96%) |
3.04s (± 0.88%) |
+0.02s (+ 0.56%) |
2.96s |
3.08s |
| Total Time |
8.87s (± 0.46%) |
8.94s (± 0.49%) |
+0.07s (+ 0.83%) |
8.84s |
9.02s |
| Angular - node (v12.1.0, x64) |
| Memory used |
331,474k (± 0.03%) |
332,501k (± 0.02%) |
+1,027k (+ 0.31%) |
332,355k |
332,624k |
| Parse Time |
1.56s (± 0.61%) |
1.57s (± 0.76%) |
+0.02s (+ 1.03%) |
1.54s |
1.60s |
| Bind Time |
0.85s (± 0.97%) |
0.87s (± 0.56%) |
+0.02s (+ 2.34%) |
0.86s |
0.88s |
| Check Time |
4.51s (± 0.66%) |
4.49s (± 0.42%) |
-0.03s (- 0.60%) |
4.45s |
4.52s |
| Emit Time |
5.45s (± 0.56%) |
5.47s (± 0.49%) |
+0.02s (+ 0.42%) |
5.42s |
5.54s |
| Total Time |
12.38s (± 0.35%) |
12.41s (± 0.30%) |
+0.03s (+ 0.26%) |
12.34s |
12.50s |
| Monaco - node (v12.1.0, x64) |
| Memory used |
344,024k (± 0.02%) |
346,450k (± 0.02%) |
+2,426k (+ 0.71%) |
346,315k |
346,645k |
| Parse Time |
1.22s (± 0.64%) |
1.23s (± 0.87%) |
+0.01s (+ 0.66%) |
1.21s |
1.25s |
| Bind Time |
0.73s (± 0.67%) |
0.74s (± 1.93%) |
+0.00s (+ 0.14%) |
0.72s |
0.79s |
| Check Time |
4.47s (± 0.36%) |
4.58s (± 0.52%) |
+0.10s (+ 2.35%) |
4.53s |
4.63s |
| Emit Time |
3.00s (± 0.79%) |
3.00s (± 0.73%) |
-0.00s (- 0.07%) |
2.96s |
3.05s |
| Total Time |
9.43s (± 0.34%) |
9.55s (± 0.49%) |
+0.12s (+ 1.23%) |
9.44s |
9.62s |
| TFS - node (v12.1.0, x64) |
| Memory used |
305,732k (± 0.02%) |
304,692k (± 0.02%) |
-1,040k (- 0.34%) |
304,587k |
304,823k |
| Parse Time |
0.95s (± 0.50%) |
0.95s (± 0.91%) |
+0.00s (+ 0.11%) |
0.93s |
0.97s |
| Bind Time |
0.69s (± 0.80%) |
0.69s (± 0.68%) |
-0.00s (- 0.29%) |
0.68s |
0.70s |
| Check Time |
4.12s (± 0.23%) |
4.14s (± 0.56%) |
+0.02s (+ 0.58%) |
4.06s |
4.17s |
| Emit Time |
3.10s (± 1.15%) |
3.07s (± 0.83%) |
-0.03s (- 0.94%) |
3.01s |
3.13s |
| Total Time |
8.86s (± 0.51%) |
8.85s (± 0.46%) |
-0.01s (- 0.08%) |
8.76s |
8.93s |
| Angular - node (v8.9.0, x64) |
| Memory used |
350,684k (± 0.01%) |
351,726k (± 0.01%) |
+1,042k (+ 0.30%) |
351,662k |
351,811k |
| Parse Time |
2.09s (± 0.47%) |
2.12s (± 0.78%) |
+0.03s (+ 1.53%) |
2.09s |
2.16s |
| Bind Time |
0.91s (± 0.73%) |
0.92s (± 1.09%) |
+0.01s (+ 1.20%) |
0.89s |
0.94s |
| Check Time |
5.38s (± 0.63%) |
5.34s (± 0.73%) |
-0.04s (- 0.71%) |
5.24s |
5.45s |
| Emit Time |
6.27s (± 0.96%) |
6.27s (± 0.83%) |
+0.00s (+ 0.06%) |
6.20s |
6.38s |
| Total Time |
14.66s (± 0.61%) |
14.67s (± 0.61%) |
+0.01s (+ 0.07%) |
14.44s |
14.83s |
| Monaco - node (v8.9.0, x64) |
| Memory used |
362,452k (± 0.02%) |
364,715k (± 0.01%) |
+2,263k (+ 0.62%) |
364,632k |
364,748k |
| Parse Time |
1.57s (± 0.49%) |
1.57s (± 0.22%) |
-0.00s (- 0.13%) |
1.56s |
1.57s |
| Bind Time |
0.96s (± 1.15%) |
0.94s (± 0.81%) |
-0.01s (- 1.25%) |
0.93s |
0.96s |
| Check Time |
5.28s (± 1.23%) |
5.45s (± 1.55%) |
+0.17s (+ 3.28%) |
5.28s |
5.61s |
| Emit Time |
3.43s (± 3.12%) |
3.30s (± 4.55%) |
-0.14s (- 4.02%) |
3.02s |
3.49s |
| Total Time |
11.24s (± 0.71%) |
11.26s (± 0.81%) |
+0.02s (+ 0.19%) |
11.06s |
11.43s |
| TFS - node (v8.9.0, x64) |
| Memory used |
322,674k (± 0.01%) |
321,606k (± 0.01%) |
-1,068k (- 0.33%) |
321,536k |
321,710k |
| Parse Time |
1.27s (± 0.54%) |
1.27s (± 0.51%) |
+0.00s (+ 0.16%) |
1.25s |
1.28s |
| Bind Time |
0.75s (± 0.91%) |
0.75s (± 0.63%) |
-0.00s (- 0.66%) |
0.74s |
0.76s |
| Check Time |
4.79s (± 0.47%) |
4.76s (± 0.54%) |
-0.03s (- 0.61%) |
4.71s |
4.81s |
| Emit Time |
3.22s (± 0.50%) |
3.22s (± 0.43%) |
-0.00s (- 0.03%) |
3.19s |
3.25s |
| Total Time |
10.04s (± 0.37%) |
10.00s (± 0.37%) |
-0.03s (- 0.35%) |
9.93s |
10.07s |
| Angular - node (v8.9.0, x86) |
| Memory used |
199,273k (± 0.02%) |
199,831k (± 0.04%) |
+558k (+ 0.28%) |
199,676k |
200,047k |
| Parse Time |
2.01s (± 0.64%) |
2.04s (± 0.52%) |
+0.03s (+ 1.59%) |
2.03s |
2.08s |
| Bind Time |
1.03s (± 0.35%) |
1.03s (± 0.58%) |
0.00s ( 0.00%) |
1.01s |
1.04s |
| Check Time |
4.89s (± 0.60%) |
4.87s (± 0.33%) |
-0.02s (- 0.43%) |
4.83s |
4.91s |
| Emit Time |
6.10s (± 1.93%) |
6.16s (± 1.25%) |
+0.06s (+ 1.00%) |
6.01s |
6.32s |
| Total Time |
14.03s (± 0.97%) |
14.10s (± 0.54%) |
+0.07s (+ 0.53%) |
13.96s |
14.27s |
| Monaco - node (v8.9.0, x86) |
| Memory used |
203,369k (± 0.02%) |
204,511k (± 0.01%) |
+1,141k (+ 0.56%) |
204,463k |
204,576k |
| Parse Time |
1.60s (± 0.35%) |
1.61s (± 0.72%) |
+0.01s (+ 0.56%) |
1.59s |
1.63s |
| Bind Time |
0.76s (± 1.35%) |
0.76s (± 0.77%) |
-0.00s (- 0.26%) |
0.74s |
0.77s |
| Check Time |
5.08s (± 1.78%) |
5.45s (± 1.22%) |
+0.36s (+ 7.14%) |
5.22s |
5.57s |
| Emit Time |
3.21s (± 2.34%) |
2.90s (± 3.30%) |
-0.31s (- 9.66%) |
2.83s |
3.28s |
| Total Time |
10.65s (± 0.33%) |
10.71s (± 0.56%) |
+0.06s (+ 0.57%) |
10.59s |
10.87s |
| TFS - node (v8.9.0, x86) |
| Memory used |
182,089k (± 0.02%) |
181,473k (± 0.02%) |
-616k (- 0.34%) |
181,416k |
181,569k |
| Parse Time |
1.30s (± 0.96%) |
1.32s (± 0.72%) |
+0.02s (+ 1.23%) |
1.30s |
1.34s |
| Bind Time |
0.71s (± 1.60%) |
0.71s (± 1.32%) |
-0.00s (- 0.28%) |
0.70s |
0.74s |
| Check Time |
4.52s (± 0.78%) |
4.54s (± 1.01%) |
+0.03s (+ 0.58%) |
4.46s |
4.68s |
| Emit Time |
2.99s (± 0.76%) |
3.01s (± 1.58%) |
+0.02s (+ 0.74%) |
2.96s |
3.18s |
| Total Time |
9.52s (± 0.55%) |
9.58s (± 0.85%) |
+0.06s (+ 0.68%) |
9.45s |
9.79s |
System
| Machine Name | ts-ci-ubuntu |
| Platform | linux 4.4.0-166-generic |
| Architecture | x64 |
| Available Memory | 16 GB |
| Available Memory | 5 GB |
| CPUs | 4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz |
Hosts
- node (v10.16.3, x64)
- node (v12.1.0, x64)
- node (v8.9.0, x64)
- node (v8.9.0, x86)
Scenarios
- Angular - node (v10.16.3, x64)
- Angular - node (v12.1.0, x64)
- Angular - node (v8.9.0, x64)
- Angular - node (v8.9.0, x86)
- Monaco - node (v10.16.3, x64)
- Monaco - node (v12.1.0, x64)
- Monaco - node (v8.9.0, x64)
- Monaco - node (v8.9.0, x86)
- TFS - node (v10.16.3, x64)
- TFS - node (v12.1.0, x64)
- TFS - node (v8.9.0, x64)
- TFS - node (v8.9.0, x86)
| Benchmark |
Name |
Iterations |
| Current |
36014 |
10 |
| Baseline |
master |
10 |
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Re that On-Demand Benchmark test failure: Monaco check time went up 7.14% (line link). but emit time decreased by almost as much (31s out of 36s), and the total time went up only by 0.57%:
│ Monaco - node (v8.9.0, x86) │
├─────────────┬────────────────────┬────────────────────┬───────────────────┬──────────┬──────────┤
│ Memory used │ 203,369k (± 0.02%) │ 204,511k (± 0.01%) │ +1,141k (+ 0.56%) │ 204,463k │ 204,576k │
│ Parse Time │ 1.60s (± 0.35%) │ 1.61s (± 0.72%) │ +0.01s (+ 0.56%) │ 1.59s │ 1.63s │
│ Bind Time │ 0.76s (± 1.35%) │ 0.76s (± 0.77%) │ -0.00s (- 0.26%) │ 0.74s │ 0.77s │
│ Check Time │ 5.08s (± 1.78%) │ 5.45s (± 1.22%) │ +0.36s (+ 7.14%) │ 5.22s │ 5.57s │
│ Emit Time │ 3.21s (± 2.34%) │ 2.90s (± 3.30%) │ -0.31s (- 9.66%) │ 2.83s │ 3.28s │
├─────────────┼────────────────────┼────────────────────┼───────────────────┼──────────┼──────────┤
│ Total Time │ 10.65s (± 0.33%) │ 10.71s (± 0.56%) │ +0.06s (+ 0.57%) │ 10.59s │ 10.87s │
...so this feels like it's not a serious performance degradation, and this PR is still valid? 😁
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This is great!
Josh Ghoulberg 👻 (@JoshuaKGoldberg) I've also been toying around with implementing this. However, I was making @ts-ignore and @ts-expect-error pragmas instead of adding a new concept (Comment Directive).
I added the @ts-expect-error as a new pragma (and was going to add @ts-ignore too):
"ts-expect-error": {
kind: PragmaKindFlags.AnySingleLine
}
And then I parse it in processCommentPragmas in parser.ts:
iterateAllCommentRanges(sourceText, (range) => {
const comment = sourceText.substring(range.pos, range.end);
extractPragmas(pragmas, range, comment, PragmaKindFlags.AnySingleLine);
});
(iterateAllCommentRanges is a new function I added to scanner.ts)
While I couldn't find a formal definition of "pragmas" in programming languages, in some programming languages, a "pragma" can be in places other than just the top of the file (https://dlang.org/spec/pragma.html).
Here's my in progress diff: https://gist.github.com/davidgomes/5cb71342b6d2cf95ffa05a767eb802c7
|
JoshuaKGoldberg reacted with heart emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I’d love to have something more powerful:
//@ts-expect-error 2322 "Type 'number' is not assignable to type 'never'."
Maybe with the option to omit trailing characters of the message and/or the error number. The former could be achieved via regular expressions:
//@ts-expect-error 2322 /^Type 'number' is not assignable to type 'never'\.$/
Rationale: It’s not only a problem to expect errors where there aren’t any, but also to expect the wrong kind of error.
|
levenleven, 304NotModified, Asaf-S, lijunle, Salman2301, and rawpixel-vincent reacted with thumbs up emoji
pedrottimark, lshearer, chandlerprall, satya164, luke-john, OliverJAsh, razh, andrewdotn, SlurpTheo, jednano, and 20 more reacted with heart emoji
All reactions
-
👍
6 reactions
-
❤️
30 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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Hey Orta Therox (@orta), 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/67018/artifacts?artifactName=tgz&fileId=5E21999D0FB04B583BB8D7FCD8E00648D55FEC3D17EA25E3229AC512A97BB1D902&fileName=/typescript-3.9.0-insiders.20200303.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.
|
Orta Therox (@orta)
The results of the perf run you requested are in!
Here they are:
Comparison Report - master..36014
| Metric |
master |
36014 |
Delta |
Best |
Worst |
| Angular - node (v10.16.3, x64) |
| Memory used |
334,334k (± 0.05%) |
333,871k (± 0.02%) |
-463k (- 0.14%) |
333,714k |
333,996k |
| Parse Time |
1.62s (± 0.61%) |
1.63s (± 0.64%) |
+0.01s (+ 0.62%) |
1.62s |
1.66s |
| Bind Time |
0.89s (± 0.82%) |
0.89s (± 0.90%) |
+0.00s (+ 0.45%) |
0.87s |
0.91s |
| Check Time |
4.70s (± 0.53%) |
4.73s (± 0.53%) |
+0.03s (+ 0.53%) |
4.67s |
4.79s |
| Emit Time |
5.30s (± 0.48%) |
5.32s (± 1.12%) |
+0.03s (+ 0.49%) |
5.22s |
5.46s |
| Total Time |
12.51s (± 0.28%) |
12.57s (± 0.54%) |
+0.07s (+ 0.52%) |
12.42s |
12.75s |
| Monaco - node (v10.16.3, x64) |
| Memory used |
335,259k (± 0.01%) |
335,293k (± 0.02%) |
+34k (+ 0.01%) |
335,184k |
335,482k |
| Parse Time |
1.25s (± 0.82%) |
1.26s (± 0.49%) |
+0.01s (+ 0.64%) |
1.25s |
1.28s |
| Bind Time |
0.78s (± 0.94%) |
0.78s (± 0.47%) |
-0.00s (- 0.26%) |
0.77s |
0.78s |
| Check Time |
4.72s (± 0.64%) |
4.71s (± 0.41%) |
-0.00s (- 0.11%) |
4.66s |
4.74s |
| Emit Time |
2.93s (± 0.71%) |
2.90s (± 0.52%) |
-0.03s (- 0.92%) |
2.87s |
2.94s |
| Total Time |
9.67s (± 0.33%) |
9.64s (± 0.32%) |
-0.03s (- 0.27%) |
9.58s |
9.72s |
| TFS - node (v10.16.3, x64) |
| Memory used |
299,484k (± 0.02%) |
299,513k (± 0.02%) |
+29k (+ 0.01%) |
299,396k |
299,660k |
| Parse Time |
0.94s (± 0.59%) |
0.94s (± 0.63%) |
+0.00s (+ 0.32%) |
0.93s |
0.96s |
| Bind Time |
0.74s (± 0.49%) |
0.75s (± 0.80%) |
+0.00s (+ 0.27%) |
0.73s |
0.76s |
| Check Time |
4.27s (± 0.49%) |
4.25s (± 0.49%) |
-0.02s (- 0.52%) |
4.20s |
4.28s |
| Emit Time |
3.03s (± 0.75%) |
3.03s (± 0.70%) |
+0.00s (+ 0.10%) |
2.98s |
3.07s |
| Total Time |
8.99s (± 0.37%) |
8.97s (± 0.32%) |
-0.01s (- 0.13%) |
8.93s |
9.04s |
| material-ui - node (v10.16.3, x64) |
| Memory used |
488,881k (± 0.01%) |
488,611k (± 0.02%) |
-269k (- 0.06%) |
488,423k |
488,854k |
| Parse Time |
1.77s (± 0.34%) |
1.78s (± 0.70%) |
+0.00s (+ 0.28%) |
1.75s |
1.82s |
| Bind Time |
0.68s (± 0.76%) |
0.68s (± 0.50%) |
+0.00s (+ 0.29%) |
0.68s |
0.69s |
| Check Time |
13.62s (± 0.93%) |
13.58s (± 0.86%) |
-0.04s (- 0.31%) |
13.38s |
13.84s |
| Emit Time |
0.00s (± 0.00%) |
0.00s (± 0.00%) |
0.00s ( NaN%) |
0.00s |
0.00s |
| Total Time |
16.08s (± 0.81%) |
16.04s (± 0.78%) |
-0.03s (- 0.21%) |
15.83s |
16.32s |
| Angular - node (v12.1.0, x64) |
| Memory used |
309,968k (± 0.14%) |
309,704k (± 0.02%) |
-264k (- 0.09%) |
309,558k |
309,856k |
| Parse Time |
1.58s (± 0.53%) |
1.58s (± 0.39%) |
+0.00s (+ 0.13%) |
1.57s |
1.60s |
| Bind Time |
0.87s (± 0.87%) |
0.87s (± 0.95%) |
+0.01s (+ 0.92%) |
0.86s |
0.90s |
| Check Time |
4.62s (± 0.69%) |
4.62s (± 0.70%) |
+0.00s (+ 0.06%) |
4.54s |
4.69s |
| Emit Time |
5.48s (± 1.25%) |
5.44s (± 0.83%) |
-0.03s (- 0.60%) |
5.38s |
5.54s |
| Total Time |
12.54s (± 0.75%) |
12.52s (± 0.59%) |
-0.02s (- 0.17%) |
12.40s |
12.69s |
| Monaco - node (v12.1.0, x64) |
| Memory used |
315,184k (± 0.01%) |
315,263k (± 0.02%) |
+79k (+ 0.03%) |
315,157k |
315,384k |
| Parse Time |
1.20s (± 0.40%) |
1.21s (± 0.62%) |
+0.01s (+ 0.91%) |
1.19s |
1.22s |
| Bind Time |
0.74s (± 1.10%) |
0.75s (± 0.74%) |
+0.00s (+ 0.67%) |
0.74s |
0.76s |
| Check Time |
4.55s (± 0.26%) |
4.57s (± 0.62%) |
+0.02s (+ 0.42%) |
4.53s |
4.66s |
| Emit Time |
2.96s (± 0.72%) |
2.98s (± 0.87%) |
+0.02s (+ 0.57%) |
2.92s |
3.03s |
| Total Time |
9.46s (± 0.28%) |
9.51s (± 0.51%) |
+0.05s (+ 0.58%) |
9.39s |
9.63s |
| TFS - node (v12.1.0, x64) |
| Memory used |
281,780k (± 0.02%) |
281,741k (± 0.02%) |
-39k (- 0.01%) |
281,586k |
281,833k |
| Parse Time |
0.92s (± 0.79%) |
0.93s (± 1.34%) |
+0.01s (+ 1.30%) |
0.91s |
0.96s |
| Bind Time |
0.71s (± 0.97%) |
0.71s (± 0.84%) |
+0.00s (+ 0.14%) |
0.69s |
0.72s |
| Check Time |
4.18s (± 0.72%) |
4.19s (± 0.48%) |
+0.01s (+ 0.33%) |
4.15s |
4.24s |
| Emit Time |
3.08s (± 1.35%) |
3.08s (± 0.87%) |
-0.00s (- 0.13%) |
3.01s |
3.13s |
| Total Time |
8.89s (± 0.57%) |
8.91s (± 0.46%) |
+0.03s (+ 0.30%) |
8.83s |
9.00s |
| material-ui - node (v12.1.0, x64) |
| Memory used |
466,312k (± 0.02%) |
466,106k (± 0.01%) |
-206k (- 0.04%) |
466,003k |
466,237k |
| Parse Time |
1.74s (± 0.33%) |
1.75s (± 0.42%) |
+0.01s (+ 0.40%) |
1.74s |
1.77s |
| Bind Time |
0.62s (± 0.95%) |
0.63s (± 0.54%) |
+0.00s (+ 0.48%) |
0.62s |
0.63s |
| Check Time |
12.05s (± 0.54%) |
12.08s (± 0.82%) |
+0.03s (+ 0.23%) |
11.89s |
12.25s |
| Emit Time |
0.00s (± 0.00%) |
0.00s (± 0.00%) |
0.00s ( NaN%) |
0.00s |
0.00s |
| Total Time |
14.41s (± 0.46%) |
14.45s (± 0.69%) |
+0.04s (+ 0.28%) |
14.26s |
14.63s |
| Angular - node (v8.9.0, x64) |
| Memory used |
329,366k (± 0.01%) |
328,978k (± 0.01%) |
-387k (- 0.12%) |
328,871k |
329,088k |
| Parse Time |
2.11s (± 0.32%) |
2.12s (± 1.18%) |
+0.01s (+ 0.66%) |
2.09s |
2.21s |
| Bind Time |
0.92s (± 0.87%) |
0.93s (± 0.82%) |
+0.00s (+ 0.43%) |
0.91s |
0.94s |
| Check Time |
5.51s (± 0.44%) |
5.51s (± 0.56%) |
-0.00s (- 0.09%) |
5.44s |
5.59s |
| Emit Time |
6.23s (± 0.90%) |
6.27s (± 0.90%) |
+0.04s (+ 0.63%) |
6.17s |
6.44s |
| Total Time |
14.78s (± 0.43%) |
14.82s (± 0.52%) |
+0.05s (+ 0.33%) |
14.67s |
15.05s |
| Monaco - node (v8.9.0, x64) |
| Memory used |
333,576k (± 0.02%) |
333,611k (± 0.01%) |
+35k (+ 0.01%) |
333,550k |
333,687k |
| Parse Time |
1.54s (± 0.66%) |
1.54s (± 0.38%) |
+0.01s (+ 0.52%) |
1.53s |
1.56s |
| Bind Time |
0.90s (± 0.66%) |
0.91s (± 1.27%) |
+0.01s (+ 1.23%) |
0.88s |
0.93s |
| Check Time |
5.40s (± 0.60%) |
5.37s (± 0.73%) |
-0.03s (- 0.56%) |
5.25s |
5.44s |
| Emit Time |
3.55s (± 0.56%) |
3.55s (± 0.65%) |
+0.01s (+ 0.14%) |
3.49s |
3.60s |
| Total Time |
11.38s (± 0.36%) |
11.37s (± 0.44%) |
-0.01s (- 0.08%) |
11.23s |
11.44s |
| TFS - node (v8.9.0, x64) |
| Memory used |
298,881k (± 0.02%) |
298,919k (± 0.02%) |
+38k (+ 0.01%) |
298,834k |
299,038k |
| Parse Time |
1.25s (± 0.53%) |
1.25s (± 0.27%) |
0.00s ( 0.00%) |
1.25s |
1.26s |
| Bind Time |
0.75s (± 0.69%) |
0.75s (± 1.29%) |
0.00s ( 0.00%) |
0.74s |
0.78s |
| Check Time |
4.83s (± 1.44%) |
4.87s (± 1.67%) |
+0.05s (+ 0.95%) |
4.75s |
5.12s |
| Emit Time |
3.34s (± 1.92%) |
3.29s (± 2.39%) |
-0.05s (- 1.53%) |
3.04s |
3.40s |
| Total Time |
10.17s (± 0.32%) |
10.16s (± 0.51%) |
-0.01s (- 0.08%) |
10.04s |
10.28s |
| material-ui - node (v8.9.0, x64) |
| Memory used |
494,722k (± 0.01%) |
494,521k (± 0.01%) |
-201k (- 0.04%) |
494,404k |
494,650k |
| Parse Time |
2.11s (± 0.53%) |
2.11s (± 0.77%) |
+0.00s (+ 0.24%) |
2.09s |
2.16s |
| Bind Time |
0.82s (± 1.35%) |
0.82s (± 1.02%) |
-0.00s (- 0.24%) |
0.80s |
0.83s |
| Check Time |
19.54s (± 0.47%) |
19.58s (± 0.77%) |
+0.05s (+ 0.24%) |
19.28s |
19.95s |
| Emit Time |
0.00s (± 0.00%) |
0.00s (± 0.00%) |
0.00s ( NaN%) |
0.00s |
0.00s |
| Total Time |
22.46s (± 0.47%) |
22.51s (± 0.65%) |
+0.05s (+ 0.24%) |
22.22s |
22.88s |
| Angular - node (v8.9.0, x86) |
| Memory used |
188,954k (± 0.03%) |
188,755k (± 0.03%) |
-199k (- 0.11%) |
188,624k |
188,855k |
| Parse Time |
2.05s (± 0.77%) |
2.06s (± 0.67%) |
+0.01s (+ 0.34%) |
2.03s |
2.10s |
| Bind Time |
1.07s (± 1.10%) |
1.07s (± 0.93%) |
+0.00s (+ 0.37%) |
1.06s |
1.09s |
| Check Time |
5.07s (± 0.95%) |
5.02s (± 0.55%) |
-0.05s (- 0.91%) |
4.97s |
5.11s |
| Emit Time |
6.19s (± 1.27%) |
6.15s (± 0.86%) |
-0.04s (- 0.69%) |
5.99s |
6.25s |
| Total Time |
14.38s (± 0.92%) |
14.30s (± 0.48%) |
-0.08s (- 0.52%) |
14.12s |
14.44s |
| Monaco - node (v8.9.0, x86) |
| Memory used |
189,214k (± 0.02%) |
189,263k (± 0.03%) |
+49k (+ 0.03%) |
189,113k |
189,383k |
| Parse Time |
1.58s (± 0.99%) |
1.59s (± 0.41%) |
+0.00s (+ 0.25%) |
1.58s |
1.61s |
| Bind Time |
0.77s (± 0.87%) |
0.77s (± 0.72%) |
+0.00s (+ 0.13%) |
0.76s |
0.78s |
| Check Time |
5.35s (± 1.51%) |
5.39s (± 1.28%) |
+0.03s (+ 0.64%) |
5.20s |
5.47s |
| Emit Time |
3.01s (± 3.38%) |
2.97s (± 3.07%) |
-0.04s (- 1.30%) |
2.84s |
3.22s |
| Total Time |
10.71s (± 0.33%) |
10.71s (± 0.41%) |
-0.00s (- 0.01%) |
10.61s |
10.79s |
| TFS - node (v8.9.0, x86) |
| Memory used |
170,430k (± 0.02%) |
170,441k (± 0.03%) |
+11k (+ 0.01%) |
170,334k |
170,531k |
| Parse Time |
1.28s (± 0.73%) |
1.28s (± 0.83%) |
+0.00s (+ 0.31%) |
1.27s |
1.32s |
| Bind Time |
0.72s (± 0.77%) |
0.72s (± 1.17%) |
+0.00s (+ 0.14%) |
0.70s |
0.74s |
| Check Time |
4.62s (± 1.13%) |
4.60s (± 0.65%) |
-0.02s (- 0.37%) |
4.52s |
4.66s |
| Emit Time |
2.99s (± 1.87%) |
3.01s (± 1.57%) |
+0.02s (+ 0.80%) |
2.96s |
3.19s |
| Total Time |
9.61s (± 0.58%) |
9.62s (± 0.37%) |
+0.01s (+ 0.10%) |
9.56s |
9.74s |
| material-ui - node (v8.9.0, x86) |
| Memory used |
277,168k (± 0.02%) |
277,026k (± 0.01%) |
-142k (- 0.05%) |
276,958k |
277,079k |
| Parse Time |
2.17s (± 0.38%) |
2.17s (± 0.59%) |
+0.00s (+ 0.00%) |
2.15s |
2.20s |
| Bind Time |
0.69s (± 1.16%) |
0.69s (± 0.75%) |
+0.00s (+ 0.15%) |
0.68s |
0.70s |
| Check Time |
17.72s (± 0.80%) |
17.57s (± 0.43%) |
-0.15s (- 0.85%) |
17.43s |
17.74s |
| Emit Time |
0.00s (± 0.00%) |
0.00s (± 0.00%) |
0.00s ( NaN%) |
0.00s |
0.00s |
| Total Time |
20.58s (± 0.69%) |
20.44s (± 0.37%) |
-0.15s (- 0.71%) |
20.30s |
20.59s |
System
| Machine Name | ts-ci-ubuntu |
| Platform | linux 4.4.0-166-generic |
| Architecture | x64 |
| Available Memory | 16 GB |
| Available Memory | 1 GB |
| CPUs | 4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz |
Hosts
- node (v10.16.3, x64)
- node (v12.1.0, x64)
- node (v8.9.0, x64)
- node (v8.9.0, x86)
Scenarios
- Angular - node (v10.16.3, x64)
- Angular - node (v12.1.0, x64)
- Angular - node (v8.9.0, x64)
- Angular - node (v8.9.0, x86)
- Monaco - node (v10.16.3, x64)
- Monaco - node (v12.1.0, x64)
- Monaco - node (v8.9.0, x64)
- Monaco - node (v8.9.0, x86)
- TFS - node (v10.16.3, x64)
- TFS - node (v12.1.0, x64)
- TFS - node (v8.9.0, x64)
- TFS - node (v8.9.0, x86)
- material-ui - node (v10.16.3, x64)
- material-ui - node (v12.1.0, x64)
- material-ui - node (v8.9.0, x64)
- material-ui - node (v8.9.0, x86)
| Benchmark |
Name |
Iterations |
| Current |
36014 |
10 |
| Baseline |
master |
10 |
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
These numbers make more sense to me - basically everything is varying in the 0.x range on a plus or minus which is basically just normal noise in perf tests.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, happy to merge based on your answer to the my comment above
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
This would make it possible to deprecate $ExpectError in dtslint.
It would also reduce noise in IDEs, as $ExpectError still results in the error being shown in the IDE.
|
eps1lon, SlurpTheo, and karlhorky reacted with thumbs up emoji
JoshuaKGoldberg reacted with hooray emoji
All reactions
-
👍
3 reactions
-
🎉
1 reaction
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
OK, this looks good to go - thanks!
I don't know if it's in TypeScript, or in vscode, but we should also get // @ts-expect-error to show up in the autocomplete in comments too, but I'm good for that to be another PR.
The playground doesn't show any of those options.
|
ExE-Boss reacted with thumbs up emoji
JoshuaKGoldberg, deepsweet, IllusionMH, ExE-Boss, and Mouvedia reacted with hooray emoji
JoshuaKGoldberg, ExE-Boss, and mredigonda reacted with heart emoji
All reactions
-
👍
1 reaction
-
🎉
5 reactions
-
❤️
3 reactions
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
IllusionMH and ExE-Boss reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I love this! Does this mean we can use @ts-expect instead of the tslint expect rule and $ExpectError?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ExE-Boss reacted with thumbs up emoji
eps1lon, styfle, and ExE-Boss reacted with heart emoji
All reactions
-
👍
1 reaction
-
❤️
3 reactions
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Mar 5, 2020
|
As someone else already mentioned, I second that it would be nice to be able to specify exactly what error to expect (by its id/code etc). I've only used ts-ignore a few times but have already ran into the problem where I think I'm ignoring one error just to have it transform into another completely unrelated error however, unknowingly, since this transformation happened in "the meantime" while the ts-ignore directive was still active/in-place the whole time. So the new error that the old error "transformed into" went completely unnoticed from what I remember (until I removed the directive of course, which was when I found out about the change). Now I try to just avoid ts-ignore altogether because of such potential situations that may arise because it's just not worth taking that kind of a risk imo.
|
ExE-Boss, pushkine, 304NotModified, mbest, misuken-now, asktree, lijunle, GlennyDC, jbreckmckye, rawpixel-vincent, and 2 more reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
related to Tyler D (@Tyler1205) 's comment I would like to be able to specify number of errors, and that might be easier to handle.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
related to Tyler D (@Tyler1205) 's comment I would like to be able to specify number of errors, and that might be easier to handle.
I agree, this is really needed as you can never know if you are blocking more than 1 error, or the wrong kind of error
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
|