Update the type assertion errors to jsx syntax error as we are treating js files as jsx files

This commit is contained in:
Sheetal Nandi 2015-09-22 12:50:25 -07:00
parent e044d3e6b5
commit 0fe282e719
2 changed files with 10 additions and 9 deletions

View file

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

View file

@ -4,12 +4,13 @@
// @Filename: a.js
//// var v = <string>undefined;
verify.getSemanticDiagnostics(`[
verify.getSyntacticDiagnostics(`[
{
"message": "'type assertion expressions' can only be used in a .ts file.",
"start": 9,
"length": 6,
"message": "Expected corresponding JSX closing tag for 'string'.",
"start": 26,
"length": 0,
"category": "error",
"code": 8016
"code": 17002
}
]`);
]`);
verify.getSemanticDiagnostics(`[]`);