Skip to content

Commit 642fd62

Browse files
authored
chore: clarify tsconfig resolution behavior in doc comments (#873)
Tweaked the comments to clarify the behavior a bit.
1 parent feee369 commit 642fd62

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
175175
/// For CommonJS modules, it is the `__dirname` variable that contains the absolute path to the folder containing current module.
176176
/// For ECMAScript modules, it is the value of `import.meta.url`.
177177
///
178-
/// NOTE: [TsconfigDiscovery::Auto] does not work for this API, use
179-
/// `ResolverGeneric::resolve_file` instead.
178+
/// NOTE: [TsconfigDiscovery::Auto] does not work for this API, use [ResolverGeneric::resolve_file] instead.
180179
///
181180
/// # Errors
182181
///
@@ -197,7 +196,7 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
197196

198197
/// Resolve `specifier` for an absolute path to a file.
199198
///
200-
/// NOTE: [TsconfigDiscovery::Auto] only work for this API, use `ResolverGeneric::resolve_file` instead.
199+
/// NOTE: [TsconfigDiscovery::Auto] only work for this API.
201200
///
202201
/// # Errors
203202
///

src/tsconfig_resolver.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ impl TsconfigResolveContext {
3737
impl<Fs: FileSystem> ResolverGeneric<Fs> {
3838
/// Finds the `tsconfig` to which this `path` belongs.
3939
///
40+
/// If the `path` is inside `node_modules`, this function always returns `None`.
41+
///
4042
/// Algorithm:
4143
///
4244
/// 1. Search for `tsconfig.json` in ancestor directories.

0 commit comments

Comments
 (0)