Struct swc_ecma_loader::resolvers::tsc::TsConfigResolver
source · pub struct TsConfigResolver<R>where
R: Resolve,{ /* private fields */ }
Available on crate feature
tsc
only.Expand description
Support for paths
of tsconfig.json
.
See https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping
Implementations§
source§impl<R> TsConfigResolver<R>where
R: Resolve,
impl<R> TsConfigResolver<R>where R: Resolve,
sourcepub fn new(
inner: R,
base_url: PathBuf,
paths: Vec<(String, Vec<String>)>
) -> Self
pub fn new( inner: R, base_url: PathBuf, paths: Vec<(String, Vec<String>)> ) -> Self
Parameters
base_url
See https://www.typescriptlang.org/tsconfig#baseUrl
The typescript documentation says This must be specified if "paths" is.
.
paths
Pass paths
map from tsconfig.json
.
See https://www.typescriptlang.org/tsconfig#paths
Note that this is not a hashmap because value is not used as a hash map.
Trait Implementations§
Auto Trait Implementations§
impl<R> RefUnwindSafe for TsConfigResolver<R>where R: RefUnwindSafe,
impl<R> Send for TsConfigResolver<R>
impl<R> Sync for TsConfigResolver<R>
impl<R> Unpin for TsConfigResolver<R>where R: Unpin,
impl<R> UnwindSafe for TsConfigResolver<R>where R: UnwindSafe,
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.