pub struct CompilerOptions { /* private fields */ }Expand description
Partial compiler options metadata.
Implementations§
Source§impl CompilerOptions
impl CompilerOptions
Sourcepub fn new() -> CompilerOptions
pub fn new() -> CompilerOptions
Creates empty compiler options metadata.
Sourcepub const fn with_target(self, target: TsTarget) -> CompilerOptions
pub const fn with_target(self, target: TsTarget) -> CompilerOptions
Sets the target option.
Sourcepub fn with_module(self, module: &str) -> CompilerOptions
pub fn with_module(self, module: &str) -> CompilerOptions
Sets the module option label.
Sourcepub const fn with_module_resolution(
self,
module_resolution: TsModuleResolution,
) -> CompilerOptions
pub const fn with_module_resolution( self, module_resolution: TsModuleResolution, ) -> CompilerOptions
Sets the module resolution option.
Sourcepub const fn with_strictness(self, strictness: TsStrictness) -> CompilerOptions
pub const fn with_strictness(self, strictness: TsStrictness) -> CompilerOptions
Sets strictness metadata.
Sourcepub fn with_jsx(self, jsx: &str) -> CompilerOptions
pub fn with_jsx(self, jsx: &str) -> CompilerOptions
Sets the JSX option label.
Sourcepub fn with_base_url(self, base_url: &str) -> CompilerOptions
pub fn with_base_url(self, base_url: &str) -> CompilerOptions
Sets the base URL option.
Sourcepub fn with_path_mapping(
self,
key: &str,
values: Vec<String>,
) -> CompilerOptions
pub fn with_path_mapping( self, key: &str, values: Vec<String>, ) -> CompilerOptions
Adds a paths mapping.
Sourcepub const fn module_resolution(&self) -> Option<TsModuleResolution>
pub const fn module_resolution(&self) -> Option<TsModuleResolution>
Returns the module resolution option.
Trait Implementations§
Source§impl Clone for CompilerOptions
impl Clone for CompilerOptions
Source§fn clone(&self) -> CompilerOptions
fn clone(&self) -> CompilerOptions
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 CompilerOptions
impl Debug for CompilerOptions
Source§impl Default for CompilerOptions
impl Default for CompilerOptions
Source§fn default() -> CompilerOptions
fn default() -> CompilerOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CompilerOptions
impl<'de> Deserialize<'de> for CompilerOptions
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompilerOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CompilerOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CompilerOptions
impl PartialEq for CompilerOptions
Source§fn eq(&self, other: &CompilerOptions) -> bool
fn eq(&self, other: &CompilerOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CompilerOptions
impl Serialize for CompilerOptions
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for CompilerOptions
impl StructuralPartialEq for CompilerOptions
Auto Trait Implementations§
impl Freeze for CompilerOptions
impl RefUnwindSafe for CompilerOptions
impl Send for CompilerOptions
impl Sync for CompilerOptions
impl Unpin for CompilerOptions
impl UnsafeUnpin for CompilerOptions
impl UnwindSafe for CompilerOptions
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