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

***

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

Represents the base interface for all elements within the rules engine.
Elements are the building blocks of scripts, pulses, actions, conditions, and parameters.

## Extends

- [`AbstractElement`](AbstractElement.md)\<[`RuleOptions`](../../interfaces/Rule/interfaces/RuleOptions.md)\>

## Extended by

- [`SimpleRule`](SimpleRule.md)

## Constructors

### Constructor

> **new AbstractRule**(`id`, `type`, `conditions`, `actions`, `options`): `AbstractRule`

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

#### Parameters

##### id

`string`

##### type

`string`

##### conditions

[`ConditionInterface`](../../interfaces/Condition/interfaces/ConditionInterface.md)\<[`ConditionOptions`](../../interfaces/Condition/interfaces/ConditionOptions.md)\>[]

##### actions

[`ActionInterface`](../../interfaces/Action/interfaces/ActionInterface.md)\<[`ActionOptions`](../../interfaces/Action/interfaces/ActionOptions.md)\>[]

##### options

[`RuleOptions`](../../interfaces/Rule/interfaces/RuleOptions.md)

#### Returns

`AbstractRule`

#### Overrides

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

## Properties

### actions

> `readonly` **actions**: [`ActionInterface`](../../interfaces/Action/interfaces/ActionInterface.md)\<[`ActionOptions`](../../interfaces/Action/interfaces/ActionOptions.md)\>[]

Defined in: [abstracts/AbstractRule.ts:11](https://github.com/SebaSOFT/neuron-js/blob/aff482a5bc89c6f9dff62f832acdd1bd10d3a175/src/abstracts/AbstractRule.ts#L11)

***

### conditions

> `readonly` **conditions**: [`ConditionInterface`](../../interfaces/Condition/interfaces/ConditionInterface.md)\<[`ConditionOptions`](../../interfaces/Condition/interfaces/ConditionOptions.md)\>[]

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

***

### 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.

#### Inherited from

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

***

### options

> `readonly` **options**: [`RuleOptions`](../../interfaces/Rule/interfaces/RuleOptions.md)

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.

#### 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.

#### Inherited from

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

## Methods

### toJSON()

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

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

#### Returns

`object`

#### Inherited from

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