feat(cactus-core-api): add ISendRequestResultV1<T> for Fujitsu verifier #2724
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An interface representing the response object of the send sync and send async
request methods on the connection-chain verifier API.
Also great when trying to help bridge the gap between the API returning
results as
unknown
and the tests needing auto-completion for the propertiesto assert for type of data at runtime.
@see {ISocketApiClient}
@see {Verifier<LedgerApiType extends ISocketApiClient>}
@see {IVerifier}
Signed-off-by: Peter Somogyvari [email protected]
refactor(core-api,verifier-client): use unknown instead of any type
Changes the ISocketApiClient and the Verifier type definitions so that
instead of
any
they are heavily relying onunknown
which helps spottingbugs in the code where type checks should be done at runtime but currently
aren't.
It also helps with spotting breaking changes in the future because if
the test cases stop compiling it means you've done a breaking API change,
but they'll always compile if the parameters and the return values are
using
any
for their own types.I've updated a big chunk of the test cases to have explicit type casts
onto the shapes that are needed for them to compile (without changing
any of the runtime behavior).
Also made it so that the json2str function of the DriverCommon
code file now accepts unknown instead of object type which makes one of
the linter warnings go away as well.
Signed-off-by: Peter Somogyvari [email protected]