> For the complete documentation index, see [llms.txt](https://basarat.gitbook.io/TypeScript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://basarat.gitbook.io/TypeScript/project/compilation-context/files.md).

# Which Files?

Use `include` and `exclude` to specify files / folders / globs. E.g.:

```javascript
{
    "include":[
        "./folder"
    ],
    "exclude":[
        "./folder/**/*.spec.ts",
        "./folder/someSubFolder"
    ]
}
```

## Globs

* For globs : `**/*` (e.g. sample usage `somefolder/**/*`) means all folder and any files (the extensions `.ts`/`.tsx` will be assumed and if `allowJs:true` so will `.js`/`.jsx`)

## `files` option

Alternatively, you can use `files` to be explicit:

```javascript
{
    "files":[
        "./some/file.ts"
    ]
}
```

But it is not recommended as you have to keep updating it. Instead use `include` to just add the containing folder.
