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

```ts twoslash
// @include: imports
const selectKey: <Value>(opts) => Promise<Value | typeof CANCEL_SYMBOL>;
```

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

## Type Parameters

&#x20;`Value` *extends* `string`

## Parameters

`opts`

[`SelectKeyOptions`](prompts.Interface.SelectKeyOptions.md)<`Value`>

## Returns

`Promise`<`Value` | *typeof* [`CANCEL_SYMBOL`](prompts.Variable.CANCEL_SYMBOL.md)>
