pub struct TsConfig {
pub root: bool,
pub path: PathBuf,
pub files: Option<Vec<PathBuf>>,
pub include: Option<Vec<PathBuf>>,
pub exclude: Option<Vec<PathBuf>>,
pub extends: Option<ExtendsField>,
pub compiler_options: CompilerOptions,
pub references: Vec<ProjectReference>,
pub references_resolved: Vec<Arc<Self>>,
/* private fields */
}Fields§
§root: boolWhether this is the caller tsconfig. Used for final template variable substitution when all configs are extended and merged.
path: PathBufPath to tsconfig.json. Contains the tsconfig.json filename.
files: Option<Vec<PathBuf>>§include: Option<Vec<PathBuf>>§exclude: Option<Vec<PathBuf>>§extends: Option<ExtendsField>§compiler_options: CompilerOptions§references: Vec<ProjectReference>§references_resolved: Vec<Arc<Self>>Resolved project references.
Corresponds to each item in TsConfig::references.
Implementations§
Source§impl TsConfig
impl TsConfig
Sourcepub fn parse(
root: bool,
path: &Path,
canonical_path: &Path,
json: String,
) -> Result<Self, Error>
pub fn parse( root: bool, path: &Path, canonical_path: &Path, json: String, ) -> Result<Self, Error>
Parses the tsconfig from a JSON string.
path is the requested path (used as identity for cache lookup and error
reporting). canonical_path anchors baseUrl / paths at the real
tsconfig directory when extends traverses a symlink. Callers that don’t
care about symlinks may pass the same value for both.
§Errors
- Any error that can be returned by
serde_json::from_str().
§Panics
- When
canonical_pathhas no parent directory.
Sourcepub fn root(&self) -> bool
pub fn root(&self) -> bool
Whether this is the caller tsconfig. Used for final template variable substitution when all configs are extended and merged.
Sourcepub fn should_build(&self) -> bool
pub fn should_build(&self) -> bool
Whether build() should normalize paths.
Sourcepub fn set_should_build(&mut self, should_build: bool)
pub fn set_should_build(&mut self, should_build: bool)
Set whether build() should normalize paths.