[gs-longan](../README.md) / CommandStep

# Class: CommandStep

## Table of contents

### Constructors

- [constructor](CommandStep.md#constructor)

### Properties

- [\_buttons](CommandStep.md#_buttons)
- [\_hint](CommandStep.md#_hint)
- [\_name](CommandStep.md#_name)
- [\_type](CommandStep.md#_type)
- [condition](CommandStep.md#condition)
- [flow](CommandStep.md#flow)
- [handleButtonsEvent](CommandStep.md#handlebuttonsevent)
- [handleTextEvent](CommandStep.md#handletextevent)
- [listNexts](CommandStep.md#listnexts)
- [stepInEvent](CommandStep.md#stepinevent)
- [stepOutEvent](CommandStep.md#stepoutevent)

### Accessors

- [type](CommandStep.md#type)

### Methods

- [buttons](CommandStep.md#buttons)
- [end](CommandStep.md#end)
- [handleButtons](CommandStep.md#handlebuttons)
- [handleText](CommandStep.md#handletext)
- [hint](CommandStep.md#hint)
- [in](CommandStep.md#in)
- [name](CommandStep.md#name)
- [next](CommandStep.md#next)
- [out](CommandStep.md#out)

## Constructors

### constructor

• **new CommandStep**(`name?`): [`CommandStep`](CommandStep.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `name?` | `string` |

#### Returns

[`CommandStep`](CommandStep.md)

## Properties

### \_buttons

• **\_buttons**: `String`[] = `[]`

___

### \_hint

• **\_hint**: `string` = `null`

___

### \_name

• **\_name**: `string` = `null`

___

### \_type

• **\_type**: [`StepType`](../enums/StepType.md) = `StepType.in`

___

### condition

• **condition**: () => `boolean` = `null`

#### Type declaration

▸ (): `boolean`

##### Returns

`boolean`

___

### flow

• **flow**: [`StepFlow`](StepFlow.md) = `null`

___

### handleButtonsEvent

• **handleButtonsEvent**: (`stepFlow`: [`StepFlow`](StepFlow.md), `text`: `string`) => `void` = `null`

#### Type declaration

▸ (`stepFlow`, `text`): `void`

##### Parameters

| Name | Type |
| :------ | :------ |
| `stepFlow` | [`StepFlow`](StepFlow.md) |
| `text` | `string` |

##### Returns

`void`

___

### handleTextEvent

• **handleTextEvent**: (`stepFlow`: [`StepFlow`](StepFlow.md), `text`: `string`) => `string` = `null`

#### Type declaration

▸ (`stepFlow`, `text`): `string`

##### Parameters

| Name | Type |
| :------ | :------ |
| `stepFlow` | [`StepFlow`](StepFlow.md) |
| `text` | `string` |

##### Returns

`string`

___

### listNexts

• **listNexts**: [`List`](List.md)\<[`CommandStep`](CommandStep.md)\>

___

### stepInEvent

• **stepInEvent**: (`commandStep`: [`CommandStep`](CommandStep.md)) => `void` = `null`

#### Type declaration

▸ (`commandStep`): `void`

##### Parameters

| Name | Type |
| :------ | :------ |
| `commandStep` | [`CommandStep`](CommandStep.md) |

##### Returns

`void`

___

### stepOutEvent

• **stepOutEvent**: (`commandStep`: [`CommandStep`](CommandStep.md)) => `void` = `null`

#### Type declaration

▸ (`commandStep`): `void`

##### Parameters

| Name | Type |
| :------ | :------ |
| `commandStep` | [`CommandStep`](CommandStep.md) |

##### Returns

`void`

## Accessors

### type

• `get` **type**(): [`StepType`](../enums/StepType.md)

#### Returns

[`StepType`](../enums/StepType.md)

## Methods

### buttons

▸ **buttons**(`value`): [`CommandStep`](CommandStep.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | `String`[] |

#### Returns

[`CommandStep`](CommandStep.md)

___

### end

▸ **end**(): [`CommandStep`](CommandStep.md)

#### Returns

[`CommandStep`](CommandStep.md)

___

### handleButtons

▸ **handleButtons**(`value`): [`CommandStep`](CommandStep.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | (`stepFlow`: [`StepFlow`](StepFlow.md), `text`: `string`) => `void` |

#### Returns

[`CommandStep`](CommandStep.md)

___

### handleText

▸ **handleText**(`value`): [`CommandStep`](CommandStep.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | (`stepFlow`: [`StepFlow`](StepFlow.md), `text`: `string`) => `string` |

#### Returns

[`CommandStep`](CommandStep.md)

___

### hint

▸ **hint**(`value`): [`CommandStep`](CommandStep.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | `string` |

#### Returns

[`CommandStep`](CommandStep.md)

___

### in

▸ **in**(`value`): [`CommandStep`](CommandStep.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | (`commandStep`: [`CommandStep`](CommandStep.md)) => `void` |

#### Returns

[`CommandStep`](CommandStep.md)

___

### name

▸ **name**(`value`): [`CommandStep`](CommandStep.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | `string` |

#### Returns

[`CommandStep`](CommandStep.md)

___

### next

▸ **next**(`steps`): [`CommandStep`](CommandStep.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `steps` | [`CommandStep`](CommandStep.md)[] |

#### Returns

[`CommandStep`](CommandStep.md)

___

### out

▸ **out**(`value`): [`CommandStep`](CommandStep.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | (`commandStep`: [`CommandStep`](CommandStep.md)) => `void` |

#### Returns

[`CommandStep`](CommandStep.md)
