Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/skarab42/resolve-tsconfig
- Owner: skarab42
- License: mit
- Created: 2022-10-26T09:08:33.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-07T08:33:36.000Z (about 1 year ago)
- Last Synced: 2024-09-22T16:37:09.011Z (about 2 months ago)
- Topics: tsconfig, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/resolve-tsconfig
- Size: 432 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)