Skip to main content
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_path
required
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_path
required
The import path to translate.

Returns

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