mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
673 B
Plaintext
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.
|
|
} |