Skip to main content

parse_tsconfig_content

Function parse_tsconfig_content 

Source
pub fn parse_tsconfig_content(
    content: &str,
    tsconfig_rel_dir: &Path,
) -> Option<TsConfigPaths>
Expand description

Parses tsconfig.json / jsconfig.json content and returns alias info.

tsconfig_rel_dir is the tsconfig directory relative to the repository root (pass "" for a root-level config). Returns None on parse failure (logs a WARN) or when neither baseUrl nor paths is present. Patterns with two or more * chars are skipped with a WARN.