Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

When to use include or include in tsconfig?


Asked by Baylor McCann on Dec 05, 2021 FAQ



An error occurs if any of the files can’t be found. This is useful when you only have a small number of files and don’t need to use a glob to reference many files. If you need that then use include. The value of extends is a string which contains a path to another configuration file to inherit from.
Consequently,
So, basically, "files" is used to specify separate files directly by their path, while "include" and "exclude" is used to target collections or groups of files or folders etc. Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! But avoid …
Moreover, There are two examples of tsconfig.json presented on the official website of TypeScript,—one with "files" property, another one with "include" and "exclude" properties specified:
Thereof,
Intro to the TSConfig Reference. A TSConfig file in a directory indicates that the directory is the root of a TypeScript or JavaScript project. The TSConfig file can be either a tsconfig.json or jsconfig.json, both have the same behavior and the same set of config variables.
Next,
Properties with relative paths found in the configuration file, which aren’t excluded from inheritance, will be resolved relative to the configuration file they originated in. Specifies an array of filenames or patterns to include in the program. These filenames are resolved relative to the directory containing the tsconfig.json file.