pub struct TsConfigInclude(/* private fields */);Implementations§
Source§impl TsConfigInclude
impl TsConfigInclude
Sourcepub fn new(input: &str) -> Result<Self, TsConfigTextError>
pub fn new(input: &str) -> Result<Self, TsConfigTextError>
Creates non-empty tsconfig metadata text.
§Errors
Returns TsConfigTextError::Empty when input is empty after trimming.
Examples found in repository?
examples/basic_usage.rs (line 11)
4fn main() -> Result<(), Box<dyn std::error::Error>> {
5 let options = CompilerOptions::new()
6 .with_target("es2022".parse::<TsTarget>()?)
7 .with_module_resolution(TsModuleResolution::Bundler)
8 .with_strictness(TsStrictness::Strict);
9 let config = TsConfig::new()
10 .with_compiler_options(options)
11 .with_include(TsConfigInclude::new("src")?);
12
13 assert_eq!(config.include().len(), 1);
14 Ok(())
15}Trait Implementations§
Source§impl Clone for TsConfigInclude
impl Clone for TsConfigInclude
Source§fn clone(&self) -> TsConfigInclude
fn clone(&self) -> TsConfigInclude
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TsConfigInclude
impl Debug for TsConfigInclude
Source§impl<'de> Deserialize<'de> for TsConfigInclude
impl<'de> Deserialize<'de> for TsConfigInclude
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
Source§impl Display for TsConfigInclude
impl Display for TsConfigInclude
Source§impl Hash for TsConfigInclude
impl Hash for TsConfigInclude
Source§impl Ord for TsConfigInclude
impl Ord for TsConfigInclude
Source§fn cmp(&self, other: &TsConfigInclude) -> Ordering
fn cmp(&self, other: &TsConfigInclude) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TsConfigInclude
impl PartialEq for TsConfigInclude
Source§fn eq(&self, other: &TsConfigInclude) -> bool
fn eq(&self, other: &TsConfigInclude) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for TsConfigInclude
impl PartialOrd for TsConfigInclude
Source§impl Serialize for TsConfigInclude
impl Serialize for TsConfigInclude
impl Eq for TsConfigInclude
impl StructuralPartialEq for TsConfigInclude
Auto Trait Implementations§
impl Freeze for TsConfigInclude
impl RefUnwindSafe for TsConfigInclude
impl Send for TsConfigInclude
impl Sync for TsConfigInclude
impl Unpin for TsConfigInclude
impl UnsafeUnpin for TsConfigInclude
impl UnwindSafe for TsConfigInclude
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