Skip to content

@sebasoft/neuron-js


Defined in: abstracts/AbstractParameter.ts:5

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:9

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:15

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:12

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:13

The actual value assigned to the parameter.

Implementation of

ParameterInterface.value

Methods

getValue()

abstract getValue(context): TValue | null

Defined in: abstracts/AbstractParameter.ts:20

Parameters

context

ExecutionContext

Returns

TValue | null


toJSON()

toJSON(): object

Defined in: abstracts/AbstractParameter.ts:22

Returns

object

Overrides

AbstractElement.toJSON