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

***

Defined in: [abstracts/AbstractParameter.ts:6](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractParameter.ts#L6)

Represents a configurable input value for Actions and Conditions.
Parameters allow for reusable logic templates by decoupling the implementation from the values.

## Extends

- [`AbstractElement`](AbstractElement.md)\<`TOptions`\>

## Extended by

- [`ComparatorParameter`](ComparatorParameter.md)
- [`SimpleNumberParameter`](SimpleNumberParameter.md)
- [`SimpleSelectParameter`](SimpleSelectParameter.md)
- [`SimpleStringParameter`](SimpleStringParameter.md)

## Type Parameters

### TValue

`TValue` = `any`

The primitive or complex type of the parameter's value.

### TOptions

`TOptions` = `any`

The type of configuration options for this parameter.

## Implements

- [`ParameterInterface`](../../interfaces/Parameter/interfaces/ParameterInterface.md)\<`TValue`, `TOptions`\>

## Constructors

### Constructor

> **new AbstractParameter**\<`TValue`, `TOptions`\>(`id`, `type`, `name`, `value`, `options`, `defaultValue?`): `AbstractParameter`\<`TValue`, `TOptions`\>

Defined in: [abstracts/AbstractParameter.ts:10](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractParameter.ts#L10)

#### Parameters

##### id

`string`

##### type

`string`

##### name

`string`

##### value

`TValue` \| `null`

##### options

`TOptions`

##### defaultValue?

`TValue`

#### Returns

`AbstractParameter`\<`TValue`, `TOptions`\>

#### Overrides

[`AbstractElement`](AbstractElement.md).[`constructor`](AbstractElement.md#constructor)

## Properties

### defaultValue?

> `readonly` `optional` **defaultValue?**: `TValue`

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

An optional fallback value if the primary value is missing or null.

#### Implementation of

[`ParameterInterface`](../../interfaces/Parameter/interfaces/ParameterInterface.md).[`defaultValue`](../../interfaces/Parameter/interfaces/ParameterInterface.md#defaultvalue)

***

### id

> `readonly` **id**: `string`

Defined in: [abstracts/AbstractElement.ts:7](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractElement.ts#L7)

Unique identifier for the element instance.

#### Implementation of

[`ParameterInterface`](../../interfaces/Parameter/interfaces/ParameterInterface.md).[`id`](../../interfaces/Parameter/interfaces/ParameterInterface.md#id)

#### Inherited from

[`AbstractElement`](AbstractElement.md).[`id`](AbstractElement.md#id)

***

### name

> `readonly` **name**: `string`

Defined in: [abstracts/AbstractParameter.ts:13](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractParameter.ts#L13)

The semantic name of the parameter (e.g., "recipient", "threshold").

#### Implementation of

[`ParameterInterface`](../../interfaces/Parameter/interfaces/ParameterInterface.md).[`name`](../../interfaces/Parameter/interfaces/ParameterInterface.md#name)

***

### options

> `readonly` **options**: `TOptions`

Defined in: [abstracts/AbstractElement.ts:9](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractElement.ts#L9)

Configuration options specific to this element instance.

#### Implementation of

[`ParameterInterface`](../../interfaces/Parameter/interfaces/ParameterInterface.md).[`options`](../../interfaces/Parameter/interfaces/ParameterInterface.md#options)

#### Inherited from

[`AbstractElement`](AbstractElement.md).[`options`](AbstractElement.md#options)

***

### type

> `readonly` **type**: `string`

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

The registered type name of the element.
This type is used by the Registry (Neuron) to look up the correct implementation.

#### Implementation of

[`ParameterInterface`](../../interfaces/Parameter/interfaces/ParameterInterface.md).[`type`](../../interfaces/Parameter/interfaces/ParameterInterface.md#type)

#### Inherited from

[`AbstractElement`](AbstractElement.md).[`type`](AbstractElement.md#type)

***

### value

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

Defined in: [abstracts/AbstractParameter.ts:14](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractParameter.ts#L14)

The actual value assigned to the parameter.

#### Implementation of

[`ParameterInterface`](../../interfaces/Parameter/interfaces/ParameterInterface.md).[`value`](../../interfaces/Parameter/interfaces/ParameterInterface.md#value)

## Methods

### execute()

> **execute**(`context`): [`ExecutionResult`](../../types/ExecutionResult/classes/ExecutionResult.md)\<`TValue` \| `null`\>

Defined in: [abstracts/AbstractParameter.ts:23](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractParameter.ts#L23)

#### Parameters

##### context

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

#### Returns

[`ExecutionResult`](../../types/ExecutionResult/classes/ExecutionResult.md)\<`TValue` \| `null`\>

***

### getValue()

> `abstract` **getValue**(`context`): `TValue` \| `null`

Defined in: [abstracts/AbstractParameter.ts:21](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractParameter.ts#L21)

#### Parameters

##### context

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

#### Returns

`TValue` \| `null`

***

### toJSON()

> **toJSON**(): `object`

Defined in: [abstracts/AbstractParameter.ts:34](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractParameter.ts#L34)

#### Returns

`object`

#### Overrides

[`AbstractElement`](AbstractElement.md).[`toJSON`](AbstractElement.md#tojson)
