You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, first of all thank you for this very useful library! I've been working on some TypeScript tooling myself and this makes using paths some much easier.
However in testing scenarios it's useful to be able to cleanup some of the side-effects that are being caused by register. I'd propose returning a function from register() that would reassign Module._resolveFilename back to originalResolveFilename. I'll happily make the PR if this seems aligned with your goals of this library as well
The text was updated successfully, but these errors were encountered:
I think this seems useful and it should not affect existing users so I don't see any problems adding it.
It does change the API but since the register() function currently returns void I guess it will not really break anyone so I would consider it a minor version increment as it is backwards compatible.
So feel free to go ahead and make a PR for it :-). If you do, please also update the README to reflect the API change.
TylorS
pushed a commit
to TylorS/tsconfig-paths
that referenced
this issue
Nov 10, 2018
Hello, first of all thank you for this very useful library! I've been working on some TypeScript tooling myself and this makes using paths some much easier.
However in testing scenarios it's useful to be able to cleanup some of the side-effects that are being caused by
register
. I'd propose returning a function fromregister()
that would reassignModule._resolveFilename
back tooriginalResolveFilename
. I'll happily make the PR if this seems aligned with your goals of this library as wellThe text was updated successfully, but these errors were encountered: