Open ghost91- opened 10 months ago
I've seen this error as well. It appears to be because VerifierOptions
as defined in src/dsl/verifier/types.ts
includes both ProxyOptions
and MessageProviderOptions
which each define stateHandlers
differently. I am not very good with Typescript, but the error message thrown indicates that the transpiler is preferring the type definition of stateHandlers
defined by MessageProviderOptions
over the one provided by ProxyOptions
.
I have an easy repro.
Pull the repo, install and remove the ts-ignore to reproduce.
Software versions
Please provide at least OS and version of pact-js
Issue Checklist
Please confirm the following:
Expected behaviour
There are no TypeScript errors when trying to provide a stateHandler with setup and teardown to a
Verifier
.Actual behaviour
Trying to provide a stateHandler with setup and teardown results in the following TypeScript error:
Steps to reproduce