-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
feat(jest-resolve): expose JestResolver
, AsyncResolver
and SyncResolver
types
#12707
Conversation
FindNodeModuleConfig, | ||
ResolveModuleConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typings for static methods of Resolver
class.
@@ -63,6 +80,7 @@ const defaultResolver: SyncResolver = (path, options) => { | |||
return pnpResolver(path, options); | |||
} | |||
|
|||
// @ts-expect-error: TODO packageFilter typings should be fixed in @types/resolve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hah, commented before your comments showed up 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packageFilter()
takes three arguments, but @types/resolve
defines just two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 will you be sending a PR to DT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure (;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Jest 28 does not expose typings for custom resolver, because of bundling. Before it was possible to import types from build directory.
This PR is exposing
JestResolver
,AsyncResolver
andSyncResolver
types which would be very useful for authors of custom resolvers.Test plan
Type tests are added.