<#1061 chore: Improve types> Pull request opened b...
# pact-js-development
g
#1061 chore: Improve types Pull request opened by TimothyJones
npm run dist
works locally (this will run tests, lint and build) ☑︎ Commit messages are ready to go in the changelog (see below for details) ☑︎ PR template filled in (see below for details) PR Template This fixes #1054 by widening the type so that the V3 matchers no longer need to be called with something that can be assigned to
AnyTemplate
. Since this is a widening of the type, it is not a breaking change. I also removed all references to
AnyTemplate
and added tsdoc so that it is deprecated. It's still exported, but just not used anywhere. It can be removed in a future major release. While I was there, I refactored the types out of matchers.ts into
types.ts
for readability. These are now re-exported by
matchers.ts
so that any (inappropriate) deep links will still work, and anyone importing the type from
MatchersV3.Matcher
will still work. I also added a TODO comment that in some future release we'll need to rename the
interfaces
that have the same names in the V2 and V3 matchers. This affects maintainers, as the current situation will result in confusing types, but I don't think it affects users. Please don't squash merge this, as the commit messages contain the details for the release notes. pact-foundation/pact-js GitHub Actions: build-and-test-ubuntu (18.x) GitHub Actions: build-and-test-ubuntu (16.x) GitHub Actions: build-and-test-ubuntu (14.x) GitHub Actions: build-and-test-windows (18.x) GitHub Actions: build-and-test-windows (16.x) GitHub Actions: build-and-test-windows (14.x) 1 other check has passed 1/7 successful checks