Documentation menu

TSConfig

TypeScript configuration file specified in tsconfig.json, used for import resolution and computing dependencies.

View source on GitHub

Attributes


base_config


Returns the base TSConfig that this config inherits from.

base_url


Returns the base URL defined in the TypeScript configuration.

config


A dictionary containing the parsed configuration settings.

config_file


The configuration file object representing the tsconfig.json file.

config_parser


The parser used to interpret the TypeScript configuration.

out_dir


Returns the outDir defined in the TypeScript configuration.

path_import_aliases


Returns a formatted version of the paths property from a TypeScript configuration file.

paths


Returns all custom module path mappings defined in the tsconfig file.

reference_import_aliases


Returns a formatted version of the references property from a TypeScript configuration file.

references


Returns a list of directories that this TypeScript configuration file depends on.

root_dir


Returns the rootDir defined in the TypeScript configuration.

root_dirs


Returns the rootDirs defined in the TypeScript configuration.

Methods


resolve_base_url

Resolves an import path with the base url.

View source on GitHub

Returns

translate_absolute_path

Translates an absolute path to an import path using the tsconfig paths.

View source on GitHub

Parameters

import_pathrequired

The absolute path to translate.

Returns

The translated import path.

translate_import_path

Translates an import path to an absolute path using the tsconfig paths.

View source on GitHub

Parameters

import_pathrequired

The import path to translate.

Returns

The translated absolute path. If no matching path alias is found, returns the original import path unchanged.