Write a simple example
Let’s write a Hello World program. In src
, create the file main.ts
:
function hello(compiler: string) { console.log(`Hello from ${compiler}`); } hello("TypeScript");
In the project root, proj
, create the file tsconfig.json
:
{ "files": [ "src/main.ts" ], "compilerOptions": { "noImplicitAny": true, "target": "es5" } }
Please login to continue.