Skip to content

@sebasoft/neuron-js


Defined in: abstracts/AbstractParameter.ts:6

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

Extends ​

Extended by ​

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 ​

Constructors ​

Constructor ​

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

Defined in: abstracts/AbstractParameter.ts:10

Parameters ​

id ​

string

type ​

string

name ​

string

value ​

TValue | null

options ​

TOptions

defaultValue? ​

TValue

Returns ​

AbstractParameter<TValue, TOptions>

Overrides ​

AbstractElement.constructor

Properties ​

defaultValue? ​

readonly optional defaultValue?: TValue

Defined in: abstracts/AbstractParameter.ts:16

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

Implementation of ​

ParameterInterface.defaultValue


id ​

readonly id: string

Defined in: abstracts/AbstractElement.ts:7

Unique identifier for the element instance.

Implementation of ​

ParameterInterface.id

Inherited from ​

AbstractElement.id


name ​

readonly name: string

Defined in: abstracts/AbstractParameter.ts:13

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

Implementation of ​

ParameterInterface.name


options ​

readonly options: TOptions

Defined in: abstracts/AbstractElement.ts:9

Configuration options specific to this element instance.

Implementation of ​

ParameterInterface.options

Inherited from ​

AbstractElement.options


type ​

readonly type: string

Defined in: abstracts/AbstractElement.ts:8

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

Implementation of ​

ParameterInterface.type

Inherited from ​

AbstractElement.type


value ​

value: TValue | null

Defined in: abstracts/AbstractParameter.ts:14

The actual value assigned to the parameter.

Implementation of ​

ParameterInterface.value

Methods ​

execute() ​

execute(context): ExecutionResult<TValue | null>

Defined in: abstracts/AbstractParameter.ts:23

Parameters ​

context ​

ExecutionContext

Returns ​

ExecutionResult<TValue | null>


getValue() ​

abstract getValue(context): TValue | null

Defined in: abstracts/AbstractParameter.ts:21

Parameters ​

context ​

ExecutionContext

Returns ​

TValue | null


toJSON() ​

toJSON(): object

Defined in: abstracts/AbstractParameter.ts:34

Returns ​

object

Overrides ​

AbstractElement.toJSON