Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skarab42/resolve-tsconfig

Find and resolve a tsconfig with some options.
https://github.com/skarab42/resolve-tsconfig

tsconfig typescript

Last synced: 15 days ago
JSON representation

Find and resolve a tsconfig with some options.

Awesome Lists containing this project

README

        

# resolve-tsconfig

Find and resolve a tsconfig with some options.

## Installation

```bash
pnpm add resolve-tsconfig
```

## Usage

```ts
import { resolveTsConfig } from 'resolve-tsconfig';

const { config, diagnostics } = resolveTsConfig();
```

## Signature

```ts
function resolveTsConfig(options?: ResolveTsConfigOptions): ResolvedTsConfig;
```

### Options

- **filePath**: `string | undefined` - Default to `tsconfig.json`.
- **startDirectory**: `string | undefined` - Default to current working directory.
- **stopDirectory**: `string | undefined` - Default to root directory.
- **startDirectoryShouldExists**: `boolean | undefined` - Default to `false`.

### Return

```ts
type ResolvedTsConfig =
| { diagnostics: ts.Diagnostic[]; config?: never }
| { config: ts.ParsedCommandLine; diagnostics?: never };
```

---

Scaffolded with [@skarab/skaffold](https://www.npmjs.com/package/@skarab/skaffold)