// TypeScript configuration that will be used to build entry-points of the CDK. To avoid
// duplicate logic, we decided to just have one package-wide tsconfig file that will be
// used by Bazel to build the sources for an entry-point. This means that we no longer
// need multiple tsconfig files (build & test) for each entry-point once Bazel replaces
// our gulp build system.
{
  "compilerOptions": {
    "baseUrl": ".",
    "declaration": true,
    "stripInternal": false,
    "experimentalDecorators": true,
    "noUnusedParameters": false,
    "noUnusedLocals": false,
    "strictNullChecks": true,
    "noImplicitReturns": true,
    "strictFunctionTypes": true,
    "noFallthroughCasesInSwitch": true,
    "noImplicitAny": true,
    "noImplicitThis": true,
    "importHelpers": true,
    "newLine": "lf",
    "module": "es2015",
    "moduleResolution": "node",
    "sourceMap": true,
    "inlineSources": true,
    "target": "es2015",
    "lib": ["es2015", "dom"],
    "skipLibCheck": true,
    "types": ["tslib"]
  },
  "bazelOptions": {
    // Note: We can remove this once we fully switched away from Gulp. Currently we still set
    // some options here just in favor of the standard tsconfig's which extending this one.
    "suppressTsconfigOverrideWarnings": true,

    // Enable tsickle so that decorators are processed by tsickle. This is necessary because
    // we don't want to ship JavaScript files that contain references to DOM elements. This
    // breaks server-side rendering for non-CLI projects: see: angular#30586.
    "tsickle": true,

    // See https://github.com/angular/angular/issues/29107
    "devmodeTargetOverride": "es5"
  }
}
