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.
false for configs loaded through extends.
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.
false for configs loaded through extends.
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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TsConfig
impl<'de> Deserialize<'de> for TsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TsConfig
impl RefUnwindSafe for TsConfig
impl Send for TsConfig
impl Sync for TsConfig
impl Unpin for TsConfig
impl UnsafeUnpin for TsConfig
impl UnwindSafe for TsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more