# escapeAction

What Escape does next, one level at a time: leave a selected vertex, then
cancel a shape being drawn, then drop the selection. Null when nothing is
left to dismiss, so the caller can close the tool.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { escapeAction } from "@mapcairn/core";
 
function escapeAction(state: DrawState): DrawAction | null;
```

## Parameters

- `state` (`DrawState`)

## Returns

`DrawAction | null`

## See also

- [`DrawState`](https://docs.mapcairn.com/api/core/DrawState.md)
- [`DrawAction`](https://docs.mapcairn.com/api/core/DrawAction.md)

Source: [packages/core/src/draw/reducer.ts:785](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/draw/reducer.ts#L785)
