Skip to content

Commit

Permalink
feat: Normalize TS2741 as TS2322 (#769)
Browse files Browse the repository at this point in the history
**Related issue:**

 - #768
  • Loading branch information
kdy1 committed Feb 28, 2023
1 parent ce15689 commit c457992
Show file tree
Hide file tree
Showing 39 changed files with 93 additions and 228 deletions.
2 changes: 1 addition & 1 deletion crates/stc_ts_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ impl ErrorKind {
// TS2739: Missing properties with a type name
// TS2740: Missing properties with type names
// TS2741: Missing properties with comparison-like error message
2739 | 2740 | 2741 => 2741,
2739 | 2740 | 2741 => 2322,

_ => code,
}
Expand Down
2 changes: 2 additions & 0 deletions crates/stc_ts_type_checker/tests/conformance.pass.txt
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ es6/destructuring/iterableArrayPattern30.ts
es6/destructuring/iterableArrayPattern4.ts
es6/destructuring/iterableArrayPattern5.ts
es6/destructuring/iterableArrayPattern6.ts
es6/destructuring/iterableArrayPattern7.ts
es6/destructuring/iterableArrayPattern8.ts
es6/destructuring/iterableArrayPattern9.ts
es6/destructuring/nonIterableRestElement1.ts
Expand Down Expand Up @@ -2206,6 +2207,7 @@ statements/for-ofStatements/ES5for-of32.ts
statements/forStatements/forStatements.ts
statements/forStatements/forStatementsMultipleValidDecl.ts
statements/ifDoWhileStatements/ifDoWhileStatements.ts
statements/returnStatements/invalidReturnStatements.ts
statements/returnStatements/returnStatements.ts
statements/switchStatements/switchStatements.ts
statements/throwStatements/throwInEnclosingStatements.ts
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Stats {
required_error: 1,
matched_error: 0,
extra_error: 1,
required_error: 0,
matched_error: 1,
extra_error: 0,
panic: 0,
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"required_errors": {
"TS2322": 2
"TS2322": 1
},
"required_error_lines": {
"TS2322": [
5,
7
]
},
"extra_errors": {
"TS2741": 1
},
"extra_error_lines": {
"TS2741": [
5
]
}
"extra_errors": {},
"extra_error_lines": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Stats {
required_error: 2,
matched_error: 2,
extra_error: 1,
required_error: 1,
matched_error: 3,
extra_error: 0,
panic: 0,
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"required_errors": {
"TS2322": 2
"TS2322": 1
},
"required_error_lines": {
"TS2322": [
5,
6
]
},
"extra_errors": {
"TS2741": 1
},
"extra_error_lines": {
"TS2741": [
5
]
}
"extra_errors": {},
"extra_error_lines": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Stats {
required_error: 2,
matched_error: 2,
extra_error: 1,
required_error: 1,
matched_error: 3,
extra_error: 0,
panic: 0,
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"required_errors": {
"TS2741": 1
"TS2322": 1
},
"required_error_lines": {
"TS2741": [
"TS2322": [
7
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"required_errors": {
"TS2741": 1,
"TS2322": 1,
"TS2710": 1,
"TS2746": 4
},
"required_error_lines": {
"TS2741": [
"TS2322": [
21
],
"TS2710": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"required_errors": {
"TS2741": 3
"TS2322": 3
},
"required_error_lines": {
"TS2741": [
"TS2322": [
26,
31,
35
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"required_errors": {
"TS2322": 5,
"TS2741": 1
"TS2322": 6
},
"required_error_lines": {
"TS2322": [
25,
27,
28,
29,
31,
32
],
"TS2741": [
31
]
},
"extra_errors": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"required_errors": {
"TS2322": 2,
"TS2741": 1
"TS2322": 3
},
"required_error_lines": {
"TS2322": [
21,
25,
33
],
"TS2741": [
25
]
},
"extra_errors": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"required_errors": {
"TS2322": 2,
"TS2741": 1
"TS2322": 3
},
"required_error_lines": {
"TS2322": [
23,
27
],
"TS2741": [
27,
31
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"required_errors": {
"TS2322": 2,
"TS2741": 1
"TS2322": 3
},
"required_error_lines": {
"TS2322": [
12,
13
],
"TS2741": [
13,
14
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"required_errors": {
"TS2741": 1
"TS2322": 1
},
"required_error_lines": {
"TS2741": [
"TS2322": [
31
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"required_errors": {
"TS2741": 1,
"TS2322": 1
"TS2322": 2
},
"required_error_lines": {
"TS2741": [
19
],
"TS2322": [
19,
25
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"required_errors": {
"TS2741": 1
"TS2322": 1
},
"required_error_lines": {
"TS2741": [
"TS2322": [
17
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"required_errors": {
"TS2741": 2,
"TS2322": 4
"TS2322": 6
},
"required_error_lines": {
"TS2741": [
26,
27
],
"TS2322": [
26,
27,
28,
28,
29,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"required_errors": {
"TS2322": 2,
"TS2741": 2
"TS2322": 4
},
"required_error_lines": {
"TS2322": [
24,
25
],
"TS2741": [
25,
26,
27
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
{
"required_errors": {
"TS2741": 2,
"TS2322": 3
},
"required_error_lines": {
"TS2741": [
41,
42
],
"TS2322": [
48,
50,
52
]
},
"extra_errors": {
"TS2322": 2
},
"extra_error_lines": {
"TS2322": [
41,
42
]
}
"extra_errors": {},
"extra_error_lines": {}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Stats {
required_error: 5,
matched_error: 10,
extra_error: 2,
required_error: 3,
matched_error: 12,
extra_error: 0,
panic: 0,
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Stats {
required_error: 1,
matched_error: 5,
extra_error: 1,
required_error: 0,
matched_error: 6,
extra_error: 0,
panic: 0,
}
Loading

0 comments on commit c457992

Please sign in to comment.