diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts index d74e97b36cc..c27308cd27c 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts @@ -2,7 +2,7 @@ // @allowNonTsExtensions: true // @Filename: a.tsjs -//// class C; +//// class C { } verify.getSemanticDiagnostics(`[ { diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts new file mode 100644 index 00000000000..27635cb34b7 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts @@ -0,0 +1,15 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: a.tsjs +//// public class C { } + +verify.getSemanticDiagnostics(`[ + { + "message": "'public' can only be used in TypeScript.", + "start": 0, + "length": 6, + "category": "error", + "code": 8008 + } +]`); \ No newline at end of file diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts new file mode 100644 index 00000000000..9fd183b9e69 --- /dev/null +++ b/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts @@ -0,0 +1,15 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: a.tsjs +//// class C implements D { } + +verify.getSemanticDiagnostics(`[ + { + "message": "'implements clauses' can only be used in TypeScript.", + "start": 8, + "length": 12, + "category": "error", + "code": 8005 + } +]`); \ No newline at end of file