From 0fe282e71994ac950e32b8040e714f563609a32f Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 22 Sep 2015 12:50:25 -0700 Subject: [PATCH] Update the type assertion errors to jsx syntax error as we are treating js files as jsx files --- .../jsFileCompilationTypeAssertions.errors.txt | 6 +++--- .../fourslash/getJavaScriptSemanticDiagnostics20.ts | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index de1e1038db6..6d4ef23dcc6 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -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 = undefined; - ~~~~~~ -!!! error TS8016: 'type assertion expressions' can only be used in a .ts file. \ No newline at end of file + +!!! error TS17002: Expected corresponding JSX closing tag for 'string'. \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts index 790f02bac92..5172ee7701c 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics20.ts @@ -4,12 +4,13 @@ // @Filename: a.js //// var v = 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 } -]`); \ No newline at end of file +]`); +verify.getSemanticDiagnostics(`[]`); \ No newline at end of file