Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of tsconfig.app.json

Tags:

I am unable to understand the use of tsconfig.app.json in src folder in Angular-2 cli project. I know that tsconfig.json is use by typescript compiler, so why tsconfig.app.json?

like image 536
raju Avatar asked Feb 15 '18 00:02

raju


People also ask

What is use of Tsconfig json?

json file is a file of JSON format which allows us to point the root level files and different compiler options to setup that require to compile a TypeScript based projects. The existence of this file in a project specifies that the given directory is the TypeScript project folder root.

What is Lib in Tsconfig json?

with --lib you can specify a list of built-in API declaration groups that you can chose to include in your project. For instance, if you expect your runtime to have support for Map, Set and Promise (e.g. most evergreen browsers today), just include --lib es2015. collection,es2015. promise.


1 Answers

There are a few tsconfig.json files in the standard angular project. Here are the one you have asked about:

  • The root tsconfig.json provides the base options that different config files derive from.
  • The app tsconfig.app.json provides the options used when working with code in the app folder. This allows you to further customize the options from tsconfig.json

Other tsconfig files follow the same (base + customization) pattern.

like image 61
basarat Avatar answered Sep 21 '22 17:09

basarat