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

[Home](./index.md) &gt; [@contract-case/case-boundary](./case-boundary.md) &gt; [BoundaryStateHandler](./case-boundary.boundarystatehandler.md) &gt; [setup](./case-boundary.boundarystatehandler.setup.md)

## BoundaryStateHandler.setup() method

Call the user's state setup function.

If the user provided no setup function, this should be a function that does nothing and returns a `BoundarySuccess`

**Signature:**

```typescript
setup(): Promise<BoundaryResult>;
```

**Returns:**

Promise&lt;[BoundaryResult](./case-boundary.boundaryresult.md)<!-- -->&gt;

Either a `BoundaryFailure` with `kind=BoundaryFailureKindConstants.CASE_CONFIGURATION_ERROR` or a `BoundarySuccess` when there's no variables returned, or a `BoundarySuccessWithMap` when there are variables returned
