<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@contract-case/case-definition-dsl](./case-definition-dsl.md) &gt; [matchers](./case-definition-dsl.matchers.md) &gt; [base](./case-definition-dsl.matchers.base.md) &gt; [CascadingContextMatcher](./case-definition-dsl.matchers.base.cascadingcontextmatcher.md) &gt; [(constructor)](./case-definition-dsl.matchers.base.cascadingcontextmatcher._constructor_.md)

## matchers.base.CascadingContextMatcher.(constructor)

This is a passthrough matcher that does nothing except call the child matcher with the current actual data.

It's useful for taking advantage of the context cascading available on all matchers without needing to write you own matcher. Extend it if you want to make a matcher that only changes the context object. If you don't know what this means, you don't need to extend this matcher.

Due to limitations with JSii, extending implementations MUST NOT override `toJSON`<!-- -->, or MUST return the result of `super.toJSON()` as part of their toJSON method.

**Signature:**

```typescript
constructor(child: AnyMatcherOrData, contextModifiers: Record<string, string>, currentRunModifiers: Record<string, string>);
```

## Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead>
<tbody><tr><td>

child

</td><td>

AnyMatcherOrData

</td><td>

The matcher to apply these context changes to

</td></tr>
<tr><td>

contextModifiers

</td><td>

Record&lt;string, string&gt;

</td><td>

a map of properties to add to the context object

</td></tr>
<tr><td>

currentRunModifiers

</td><td>

Record&lt;string, string&gt;

</td><td>

a map of properties to add to the current run object.

</td></tr>
</tbody></table>
