mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 06:20:23 -06:00
Add additional tests.
This commit is contained in:
parent
e650e8a6d4
commit
1eca182ceb
@ -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
|
||||
}
|
||||
]`);
|
||||
Loading…
x
Reference in New Issue
Block a user