-
-
Notifications
You must be signed in to change notification settings - Fork 224
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: export CustomMatchers interface for declartion merging #653
Conversation
🦋 Changeset detectedLatest commit: f04281f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #653 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 73 73
Lines 674 674
Branches 290 290
=========================================
Hits 674 674 ☔ View full report in Codecov by Sentry. |
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.
thanks!
Huh, unsure why this change breaks the typecheck 🤔 |
@SimenB I'll try updating the branch. Maybe there's something else I can look into if that doesn't work? |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I'll run the type checking locally and do a bit more research on how other libraries go about declaration merging. |
I tried adding a dependency on |
I'm not sure if this is the right way to fix this, but this way passes the check. @cdierkens can you confirm whether this still works as a patch for you? |
@keeganwitt I was able to get declaration merging working with the existing types! import type CustomMatchers from "jest-extended";
import "vitest";
declare module "vitest" {
interface Assertion<T = any> extends CustomMatchers<T> {}
interface AsymmetricMatchersContaining<T = any> extends CustomMatchers<T> {}
interface ExpectStatic extends CustomMatchers<T> {}
} |
What
export CustomMatchers interface for declartion merging
Why
#652
Housekeeping