pub struct TsConfigResolver<R>where
R: Resolve,{ /* private fields */ }
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§
source§impl<R> Debug for TsConfigResolver<R>
impl<R> Debug for TsConfigResolver<R>
Auto Trait Implementations§
impl<R> Freeze for TsConfigResolver<R>where
R: Freeze,
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> 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<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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more