Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(resolver): resolution with ResolutionMode::Types should be attempted #304

Merged
merged 4 commits into from
Oct 17, 2023

Conversation

dsherret
Copy link
Member

Makes #303 actually work.

@dsherret dsherret requested a review from bartlomieju October 16, 2023 06:57
specifier: "file:///a/test01.ts",
maybe_headers: None,
content: r#"
import a from "./a";
Copy link
Member Author

@dsherret dsherret Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice how the specifier is "./a" here, but it resolves to a .js files for the code resolution and a .d.ts file for the types resolution because of how the resolver is implemented.

This will allow resolving something like "chalk" to its declaration file.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this is exciting!

@dsherret dsherret merged commit 1ba23ac into denoland:main Oct 17, 2023
3 checks passed
@dsherret dsherret deleted the fix_types_resolution_different branch October 17, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants