pub struct TsconfigOutputMap { /* private fields */ }Expand description
Static package output mappings read from a package’s TypeScript configs.
Implementations§
Source§impl TsconfigOutputMap
impl TsconfigOutputMap
Sourcepub fn from_project(root: &Path) -> Self
pub fn from_project(root: &Path) -> Self
Read root-level tsconfig files once, resolving static relative and package extends paths.
Sourcepub fn resolve_source_for_output_path(
&self,
output_path: &Path,
source_extensions: &[&str],
) -> TsconfigOutputResolution
pub fn resolve_source_for_output_path( &self, output_path: &Path, source_extensions: &[&str], ) -> TsconfigOutputResolution
Resolve an absolute output path, such as the target of a relative import, to its source file.
The path does not need to exist on disk. A path outside the project root
of this map is TsconfigOutputResolution::Unconfigured.
Sourcepub fn resolve_source_for_entry(
&self,
entry: &str,
source_extensions: &[&str],
) -> TsconfigOutputResolution
pub fn resolve_source_for_entry( &self, entry: &str, source_extensions: &[&str], ) -> TsconfigOutputResolution
Resolve a generated entry while preserving whether the output was configured.
Trait Implementations§
Source§impl Clone for TsconfigOutputMap
impl Clone for TsconfigOutputMap
Source§impl Debug for TsconfigOutputMap
impl Debug for TsconfigOutputMap
Auto Trait Implementations§
impl Freeze for TsconfigOutputMap
impl RefUnwindSafe for TsconfigOutputMap
impl Send for TsconfigOutputMap
impl Sync for TsconfigOutputMap
impl Unpin for TsconfigOutputMap
impl UnsafeUnpin for TsconfigOutputMap
impl UnwindSafe for TsconfigOutputMap
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