<!-- 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)

## matchers.base.CascadingContextMatcher class

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
export declare abstract class CascadingContextMatcher extends AnyMatcher
```

**Extends:** AnyMatcher

## Constructors

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

Constructor

</th><th>

Modifiers

</th><th>

Description

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

[(constructor)(child, contextModifiers, currentRunModifiers)](./case-definition-dsl.matchers.base.cascadingcontextmatcher._constructor_.md)

</td><td>

</td><td>

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.

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

## Methods

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

Method

</th><th>

Modifiers

</th><th>

Description

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

[toJSON()](./case-definition-dsl.matchers.base.cascadingcontextmatcher.tojson.md)

</td><td>

</td><td>

If extending this class, do not override this method (or if you do, make sure you call `super.toJSON()`<!-- -->).

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