---
url: /reference/api/logger/prompts.Variable.cancel.md
---
# Variable: cancel

```ts twoslash
// @include: imports
const cancel: (message?, opts?) => void;
```

Defined in: node\_modules/.pnpm/@clack+prompts@1.9.0/node\_modules/@clack/prompts/dist/index.d.mts:628

The `cancel` function defines an interruption of an interaction
and therefore its end.

## Parameters

`message?`

`string`

‐

`opts?`

[`CommonOptions`](prompts.Interface.CommonOptions.md)

Additional configuration options.

## Returns

`void`

## See

https://bomb.sh/docs/clack/packages/prompts/#cancel

## Example

```ts twoslash
// @include: imports
import { cancel } from "@clack/prompts";
import process from "node:process";

cancel("Installation canceled");
process.exit(1);
```
