Skip to content

Commit 0fe282e

Browse files
committed
Update the type assertion errors to jsx syntax error as we are treating js files as jsx files
1 parent e044d3e commit 0fe282e

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tests/cases/compiler/a.js(1,10): error TS8016: 'type assertion expressions' can only be used in a .ts file.
1+
tests/cases/compiler/a.js(1,27): error TS17002: Expected corresponding JSX closing tag for 'string'.
22

33

44
==== tests/cases/compiler/a.js (1 errors) ====
55
var v = <string>undefined;
6-
~~~~~~
7-
!!! error TS8016: 'type assertion expressions' can only be used in a .ts file.
6+
7+
!!! error TS17002: Expected corresponding JSX closing tag for 'string'.

tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
// @Filename: a.js
55
//// var v = <string>undefined;
66

7-
verify.getSemanticDiagnostics(`[
7+
verify.getSyntacticDiagnostics(`[
88
{
9-
"message": "'type assertion expressions' can only be used in a .ts file.",
10-
"start": 9,
11-
"length": 6,
9+
"message": "Expected corresponding JSX closing tag for 'string'.",
10+
"start": 26,
11+
"length": 0,
1212
"category": "error",
13-
"code": 8016
13+
"code": 17002
1414
}
15-
]`);
15+
]`);
16+
verify.getSemanticDiagnostics(`[]`);

0 commit comments

Comments
 (0)