typescript compiler code example

Example 1: install typescript

npm install -g typescript

Example 2: how to check typescript version

tsc --version

Example 3: how to run typescript file

npx ts-node src/foo.ts

Example 4: what is typescript

Basically, TypeScript is like an extension or "superset" of JavaScript.
Since JavaScript is a loosely typed language,
TypeScript enforces the strict use of types. 
Thus, making it a strictly typed language.

Example 5: typerscript online compiler

Try this one:
https://www.typescriptlang.org/play/

Example 6: how to allow implicit any in .d.ts

{
    "compilerOptions": {
        "skipLibCheck": true,
        ...
    },
    ...
}