Skip to content

Commit

Permalink
Update provider state types in matchers.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lviana-menlosecurity authored Jun 23, 2021
1 parent 717863f commit de3254e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/v3/matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ export function arrayContaining(
};
}

export interface ProviderStateInjectedValue extends Matcher<AnyJson> {
export interface ProviderStateInjectedValue<T> extends Matcher<T> {
expression: string;
}

Expand All @@ -445,10 +445,10 @@ export interface ProviderStateInjectedValue extends Matcher<AnyJson> {
* @param expression Expression to lookup in the provider state context
* @param exampleValue Example value to use in the consumer test
*/
export function fromProviderState(
export function fromProviderState<V extends AnyJson>(
expression: string,
exampleValue: AnyJson
): ProviderStateInjectedValue {
exampleValue: V
): ProviderStateInjectedValue<V> {
return {
'pact:matcher:type': 'type',
'pact:generator:type': 'ProviderState',
Expand Down

0 comments on commit de3254e

Please sign in to comment.