Closed
Description
We're seeing an issue with the types in the latest release (v6.4.0). In particular the addition of the ByRoleMatcher
type declaration breaks the export assignment later on, resulting in the following error:
TS2309: An export assignment cannot be used in a module with other exported elements.
@testing-library/jest-dom
version: v6.4.0node
version: n/ajest
(orvitest
) version: n/anpm
(oryarn
) version: n/a
Relevant code or config:
What you did:
Example breakage in a CI run here: https://github.com/backstage/backstage/actions/runs/7708717042/job/21008397598?pr=22596
What happened:
node_modules/@testing-library/jest-dom/types/matchers.d.ts:713:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.
713 export = matchers
~~~~~~~~~~~~~~~~~
Found 1 error in node_modules/@testing-library/jest-dom/types/matchers.d.ts:713
Reproduction:
Doesn't seem to reproduce in codesandbox, may be related to TypeScript version or config?
Problem description:
Breaks TypeScript type checks.
Suggested solution:
Might be enough to switch the re-export to export { matchers }
?
Metadata
Metadata
Assignees
Labels
No labels