tsconfig generate code example

Example 1: tsc init

tsc --init
npx tsc --init

Example 2: tsconfig.json not generated

$ tsc --init

Example 3: tsconfig configuration

{
  "compilerOptions": {
    "target": "ES2015",
    "module": "commonjs",
    "lib": [ "ES2015", "dom" ],
    "sourceMap": true,
    "outDir": "./script", 
    "strict": true, 
    "strictNullChecks": true, 
    "strictFunctionTypes": true, 
    "noImplicitThis": true, 
    "alwaysStrict": true, 
    "noImplicitReturns": true, 
    "noFallthroughCasesInSwitch": true,
    "esModuleInterop": true,
    "experimentalDecorators": true, 
  }
}

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

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