Files
tsgo/testdata/baselines/reference/fourslash/syntaxandSemanticDiagnostics/getJavaScriptSyntacticDiagnostics18.baseline

19 lines
673 B
Plaintext

// === Syntax and Semantic Diagnostics ===
/a.js(4,5): error TS8009: The 'public' modifier can only be used in TypeScript files.
/b.js(2,8): error TS8010: Type annotations can only be used in TypeScript files.
==== /a.js (1 errors) ====
class C {
x; // Regular property declaration allowed
static y; // static allowed
public z; // public not allowed
~~~~~~
!!! error TS8009: The 'public' modifier can only be used in TypeScript files.
}
==== /b.js (1 errors) ====
class C {
x: number; // Types not allowed
~~~~~~
!!! error TS8010: Type annotations can only be used in TypeScript files.
}