mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
Add additional tests.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
// @allowNonTsExtensions: true
|
||||
// @Filename: a.tsjs
|
||||
//// class C<T>;
|
||||
//// class C<T> { }
|
||||
|
||||
verify.getSemanticDiagnostics(`[
|
||||
{
|
||||
|
||||
15
tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts
Normal file
15
tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @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
|
||||
}
|
||||
]`);
|
||||
15
tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts
Normal file
15
tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @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
|
||||
}
|
||||
]`);
|
||||
Reference in New Issue
Block a user