mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
23 lines
948 B
Plaintext
23 lines
948 B
Plaintext
// === Syntax and Semantic Diagnostics ===
|
|
/b.js(2,8): error TS8010: Type annotations can only be used in TypeScript files.
|
|
/b.js(3,17): error TS8010: Type annotations can only be used in TypeScript files.
|
|
/b.js(4,5): error TS1389: 'var' is not allowed as a variable declaration name.
|
|
/b.js(4,9): error TS1134: Variable declaration expected.
|
|
/b.js(4,11): error TS1134: Variable declaration expected.
|
|
|
|
|
|
==== /b.js (5 errors) ====
|
|
var a = "a";
|
|
var b: boolean = true;
|
|
~~~~~~~
|
|
!!! error TS8010: Type annotations can only be used in TypeScript files.
|
|
function foo(): string { }
|
|
~~~~~~
|
|
!!! error TS8010: Type annotations can only be used in TypeScript files.
|
|
var var = "c";
|
|
~~~
|
|
!!! error TS1389: 'var' is not allowed as a variable declaration name.
|
|
~
|
|
!!! error TS1134: Variable declaration expected.
|
|
~~~
|
|
!!! error TS1134: Variable declaration expected. |