[**@sebasoft/neuron-js**](../../../README.md)

***

Defined in: [types/ExecutionResult.ts:8](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/types/ExecutionResult.ts#L8)

Represents the outcome of an execution unit (Script, Rule, Action, or Condition).

## Type Parameters

### TValue

`TValue` = `any`

The type of the value produced by the execution (e.g., number of rules for a Script, boolean for a Condition).

## Constructors

### Constructor

> **new ExecutionResult**\<`TValue`\>(`success`, `context`, `value?`, `messages?`): `ExecutionResult`\<`TValue`\>

Defined in: [types/ExecutionResult.ts:15](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/types/ExecutionResult.ts#L15)

#### Parameters

##### success

`boolean`

Whether the execution completed without errors.

##### context

[`ExecutionContext`](../../ExecutionContext/interfaces/ExecutionContext.md)

The state of the ExecutionContext after the run.

##### value?

`TValue` \| `null`

The primary output of the execution.

##### messages?

`string`[] = `[]`

Any informational or error messages generated.

#### Returns

`ExecutionResult`\<`TValue`\>

## Properties

### context

> `readonly` **context**: [`ExecutionContext`](../../ExecutionContext/interfaces/ExecutionContext.md)

Defined in: [types/ExecutionResult.ts:17](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/types/ExecutionResult.ts#L17)

The state of the ExecutionContext after the run.

***

### messages

> `readonly` **messages**: `string`[] = `[]`

Defined in: [types/ExecutionResult.ts:19](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/types/ExecutionResult.ts#L19)

Any informational or error messages generated.

***

### success

> `readonly` **success**: `boolean`

Defined in: [types/ExecutionResult.ts:16](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/types/ExecutionResult.ts#L16)

Whether the execution completed without errors.

***

### value

> `readonly` **value**: `TValue` \| `null` = `null`

Defined in: [types/ExecutionResult.ts:18](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/types/ExecutionResult.ts#L18)

The primary output of the execution.

## Methods

### isSuccessful()

> **isSuccessful**(): `boolean`

Defined in: [types/ExecutionResult.ts:25](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/types/ExecutionResult.ts#L25)

Helper to check if the execution was successful.

#### Returns

`boolean`
