Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

resolve-tsconfig

skarab4219.3kMIT1.3.0TypeScript support: included

Find and resolve a tsconfig with some options.

typescript, tsconfig, config, diagnostics

readme

resolve-tsconfig

Find and resolve a tsconfig with some options.

Installation

pnpm add resolve-tsconfig

Usage

import { resolveTsConfig } from 'resolve-tsconfig';

const { config, diagnostics } = resolveTsConfig();

Signature

function resolveTsConfig(options?: ResolveTsConfigOptions): ResolvedTsConfig;

Options

  • filePath: string | undefined - Default to tsconfig.json.
  • startDirectory: string | undefined - Default to current workind directory.
  • stopDirectory: string | undefined - Default to root directory.
  • startDirectoryShouldExists: boolean | undefined - Default to false.

Return

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

Scaffolded with @skarab/skaffold