Skip to content

resolve: make signature reflect impurity #4

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

Closed
wants to merge 1 commit into from

Conversation

cstrahan
Copy link

resolve will return different results depending on the current
working directory, so this should be captured in the type signature.

Also, simplify the arguments: zero arguments is the same as giving "."
as the only argument, so from and to can be collapsed into one
argument.

resolve will return different results depending on the current
working directory, so this should be captured in the type signature.

Also, simplify the arguments: zero arguments is the same as giving "."
as the only argument, so `from` and `to` can be collapsed into one
argument.
@hdgarrood
Copy link
Member

👍 I will merge this manually.

@hdgarrood
Copy link
Member

Actually, on second thoughts, I'm not convinced about collapsing from and to into one argument. In particular, it departs from how the node api is documented, so the node api docs are no longer as useful for understanding this. I also think it's a probably good thing that you have to pass at least one FilePath in; Path.resolve [] giving you the current directory seems a bit strange to me, and it's probably better to use Process.cwd for that.

@garyb garyb mentioned this pull request May 27, 2018
@garyb garyb closed this in #14 May 27, 2018
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