# tsconfig

> Resole and parse `tsconfig.json`, replicating to TypeScript's behaviour

Latest version **7.0.0** (published 2017-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install tsconfig
pnpm add tsconfig
yarn add tsconfig
bun add tsconfig
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.0.0 |
| Published | 2017-08-28 |
| First published | 2015-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 109 |
| Author | Blake Embrey |
| Maintainers | basarat, blakeembrey |
| Keywords | TypeScript, compiler, config, tsconfig, json, resolve |

## Links

- npm: https://www.npmjs.com/package/tsconfig
- Repository: https://github.com/TypeStrong/tsconfig
- Issues: https://github.com/TypeStrong/tsconfig/issues
- npm.io page: https://npm.io/package/tsconfig

## Dependencies (4)

- [strip-bom](https://npm.io/package/strip-bom.md) ^3.0.0
- [@types/strip-bom](https://npm.io/package/@types/strip-bom.md) ^3.0.0
- [strip-json-comments](https://npm.io/package/strip-json-comments.md) ^2.0.0
- [@types/strip-json-comments](https://npm.io/package/@types/strip-json-comments.md) 0.0.30

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 7.0.0 (latest) — 2017-08-28
- 6.0.0 — 2017-03-18
- 5.0.3 — 2016-07-26
- 5.0.2 — 2016-07-22
- 5.0.1 — 2016-07-22
- 5.0.0 — 2016-07-22
- 4.0.0 — 2016-07-22
- 3.0.0 — 2016-06-06
- 2.2.0 — 2015-11-18
- 2.1.1 — 2015-11-01
- 2.1.0 — 2015-10-27
- 2.0.1 — 2015-10-19
- 2.0.0 — 2015-10-09
- 1.1.0 — 2015-10-08
- 1.0.7 — 2015-10-08
- … 9 more at https://npm.io/package/tsconfig/versions

## README

# TSConfig

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

Resolve and parse [`tsconfig.json`][tsconfig], replicating TypeScript's behaviour.

## Usage

See the [TypeScript docs][tsconfig] for information on setting up `tsconfig.json`.

### API

* **resolve(cwd: string, path?: string): Promise<string | void>** Resolve `tsconfig.json`, like TypeScript, allowing a path to be specified and falling back to recursively resolving `tsconfig.json` upward when no path is specified.
* **resolveSync(cwd: string, path?: string): string | void** Synchronous `resolve`.
* **find(cwd: string): Promise<string | void>** Standalone behaviour of recursively resolving `tsconfig.json` upward.
* **findSync(cwd: string): string | void** Synchronous `find`.
* **load(cwd: string, path?: string): Promise<{ path?: string, config: any }>** Resolve, load and parse `tsconfig.json`.
* **loadSync(cwd: string, path?: string): { path?: string, config: any }** Synchronous `load`.
* **readFile(filename: string): Promise<any>** Read a JSON file as `tsconfig.json` (strip BOM, parse JSON and support empty contents).
* **readFileSync(filename: string): any** Synchronous `readFile`.
* **parse(contents: string, filename: string): any** Parse file contents as `tsconfig.json` (strip BOM, parse JSON and support empty contents).

## Contributing

Feel free to open issues for discussion.

```sh
# Install dependencies/typings.
npm install

# Run test suite.
npm test
```

## License

MIT License

[npm-image]: https://img.shields.io/npm/v/tsconfig.svg?style=flat
[npm-url]: https://npmjs.org/package/tsconfig
[downloads-image]: https://img.shields.io/npm/dm/tsconfig.svg?style=flat
[downloads-url]: https://npmjs.org/package/tsconfig
[travis-image]: https://img.shields.io/travis/TypeStrong/tsconfig.svg?style=flat
[travis-url]: https://travis-ci.org/TypeStrong/tsconfig
[coveralls-image]: https://img.shields.io/coveralls/TypeStrong/tsconfig.svg?style=flat
[coveralls-url]: https://coveralls.io/r/TypeStrong/tsconfig?branch=master
[tsconfig]: http://www.typescriptlang.org/docs/handbook/tsconfig-json.html

---
_Source: https://npm.io/package/tsconfig · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
